Modals not shown in layover

Search
Other Bug Reports questions
Forum

Modals not shown in layover

Louis Jansen's Avatar Louis Jansen
Without touching the already configured models in the editor, they do not show up in a layover in the front-end anymore. The error I get via inspect element is "The Joomla core.js file is not being loaded". In the source code of the html I can see that all things are parsed as normal. But it's clear that some Javascript does not do what it should do, so my modals are opened as a new page now.

I make use of regular labs CDN, JCH optimze and a Javascript defer plugin. The sometimes cause issues with Javascipts. But even with all 3 deactivated it doesn't solve the issue.

Setting the "load scripts/styles" option in the plugin configuration > advanced does not solve the issue.
Peter van Westen's Avatar Peter van Westen ADMIN
This indeed looks like something the defer plugin would cause. Could be a cache issue still adding the defer?
Make sure the necessary core scripts are loaded at the top of the page before other 3rd party scripts that rely on it.

It could also be something in your template that is moving scripts around.
Or it is loading its own version of jQuery that is causing conflicts.

See if you can reproduce the issue with the Joomla core template.
Please post a rating at the Joomla! Extensions Directory
Louis Jansen's Avatar Louis Jansen
Thanks for your response Peter!

The Joomla core templates has been installed quite a while ago in my environment. What core component is normally taking care of loading the core.js?

I 'fixed' the issue now with adding a line of code in your Document.php. But of course that is not a very sustainable solution. However, I have full trust that this is caused by something I did / try to optimize myself in the last half year or so.
Peter van Westen's Avatar Peter van Westen ADMIN
Modals loads the Joomla core javascript file through this command:
JHtml::_('behavior.core');
That code is triggered via this line in the plugins/system/modals/src/Document.php file:
RL_Document::scriptOptions($options, 'Modals');

So no idea what is going on in your setup that is causing that to fail or do something different.
Please post a rating at the Joomla! Extensions Directory
Louis Jansen's Avatar Louis Jansen
Thanks! That will help finding the root cause
You can only post on this forum if you log in