Search
Other Modules Anywhere questions
Forum

Error when using Modals and Modules Anywhere on Joomla 4.2.9

Russell English's Avatar Russell English
I have installed Modals and Modules Anywhere onto Joomla 4.2.9.

I have setup a login module called "Login" and have created a menu item as follows:

{modal}{module title="Login"}{/modal}

When going to the frontend, I'm getting an error:

Error: 0 WebAssetManager is locked, you came late


Call stack
# Function Location
1 () JROOT/libraries/src/WebAsset/WebAssetManager.php:259
2 Joomla\CMS\WebAsset\WebAssetManager->useAsset() JROOT/libraries/src/WebAsset/WebAssetManager.php:197
3 Joomla\CMS\WebAsset\WebAssetManager->__call() JROOT/modules/mod_login/tmpl/default.php:20
4 require() JROOT/modules/mod_login/mod_login.php:34
5 include() JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:52
6 Joomla\CMS\Dispatcher\ModuleDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/ModuleDispatcher.php:55
7 Joomla\CMS\Dispatcher\ModuleDispatcher->dispatch() JROOT/libraries/src/Helper/ModuleHelper.php:281
8 Joomla\CMS\Helper\ModuleHelper::renderRawModule() JROOT/libraries/src/Helper/ModuleHelper.php:161
9 Joomla\CMS\Helper\ModuleHelper::renderModule() JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:99
10 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() JROOT/plugins/system/modulesanywhere/src/Replace.php:565
11 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModule() JROOT/plugins/system/modulesanywhere/src/Replace.php:482
12 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processMatch() JROOT/plugins/system/modulesanywhere/src/Replace.php:668
13 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceMatches() JROOT/plugins/system/modulesanywhere/src/Replace.php:650
14 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replace() JROOT/plugins/system/modulesanywhere/src/Replace.php:79
15 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModules() JROOT/plugins/system/modulesanywhere/src/Replace.php:146
16 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceTags() JROOT/plugins/system/modulesanywhere/modulesanywhere.php:101
17 PlgSystemModulesAnywhere->changeFinalHtmlOutput() JROOT/libraries/regularlabs/src/SystemPlugin.php:149
18 RegularLabs\Library\SystemPlugin->onAfterRender() JROOT/libraries/src/Plugin/CMSPlugin.php:279
19 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
20 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:107
21 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/libraries/src/Application/CMSApplication.php:1023
22 Joomla\CMS\Application\CMSApplication->render() JROOT/libraries/src/Application/SiteApplication.php:722
23 Joomla\CMS\Application\SiteApplication->render() JROOT/libraries/src/Application/CMSApplication.php:299
24 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:61
25 require_once() JROOT/index.php:32


Any ideas what's going on please?
Peter van Westen's Avatar Peter van Westen ADMIN
When using Modules Anywhere (or pretty much any extension) inside a 'Custom' module, switch on the Prepare Content option in that module.

PS: If you want to open a module inside a modal, then your syntax for Modals is incorrect.
See: docs4.regularlabs.com/modals/content/inl...separate-content-tag
Please post a rating at the Joomla! Extensions Directory
Russell English's Avatar Russell English
Thank you, it's not a custom module though. It's a menu item.
Peter van Westen's Avatar Peter van Westen ADMIN
You can't do what you want like that.

What you place between the {modal} tags is what you click on to open the modal.
So you would have to place the module somewhere on the page inside a {modalcontent} tag or a div with a unique ID.
Then you can link to that via Modals using the content attribute.
See the documentation I pointed to.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription