Search
Other Modules Anywhere questions
Forum

WebAsset Manager is locked v2

Thomas A.'s Avatar Thomas A.
Hi we are using Modules Anywhere Pro Version v8.0.3 and also run into "WebAsset Manager is locked" issue.
Stacktrace:

WebAssetManager is locked
C:\xampp_8\htdocs\bgld_newest_from_live\libraries\src\WebAsset\WebAssetManager.php:165

Call stack
# Function Location
1 () JROOT\libraries\src\WebAsset\WebAssetManager.php:165
2 Joomla\CMS\WebAsset\WebAssetManager->reset() JROOT\libraries\src\Cache\Controller\CallbackController.php:107
3 Joomla\CMS\Cache\Controller\CallbackController->get() JROOT\plugins\system\t3\includes\core\t3.php(531) : eval()'d code:629
4 Joomla\CMS\Helper\_ModuleHelper::moduleCache() JROOT\libraries\src\Document\Renderer\Html\ModuleRenderer.php:93
5 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() JROOT\plugins\system\modulesanywhere\src\Replace.php:563
6 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processPosition() JROOT\plugins\system\modulesanywhere\src\Replace.php:450
7 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processMatch() JROOT\plugins\system\modulesanywhere\src\Replace.php:628
8 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceMatches() JROOT\plugins\system\modulesanywhere\src\Replace.php:610
9 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replace() JROOT\plugins\system\modulesanywhere\src\Replace.php:67
10 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModules() JROOT\plugins\system\modulesanywhere\src\Replace.php:122
11 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceTags() JROOT\plugins\system\modulesanywhere\modulesanywhere.php:99
12 PlgSystemModulesAnywhere->changeFinalHtmlOutput() JROOT\libraries\regularlabs\src\SystemPlugin.php:155
13 RegularLabs\Library\SystemPlugin->onAfterRender() JROOT\libraries\src\Plugin\CMSPlugin.php:289
14 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT\libraries\vendor\joomla\event\src\Dispatcher.php:486
15 Joomla\Event\Dispatcher->dispatch() JROOT\libraries\src\Application\EventAware.php:111
16 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT\libraries\src\Application\CMSApplication.php:1031
17 Joomla\CMS\Application\CMSApplication->render() JROOT\libraries\src\Application\SiteApplication.php:724
18 Joomla\CMS\Application\SiteApplication->render() JROOT\libraries\src\Application\CMSApplication.php:298
19 Joomla\CMS\Application\CMSApplication->execute() JROOT\includes\app.php:61
20 require_once() JROOT\index.php:32

It breaks as soon as caching for the module is activated or when we cache globally.

We are using a template based on t3, which calls $this->loadBlock ...
and inside there we have parts like:

{modulepos someModule123}

is this a know issue or an issue with the t3 system plugin template
Peter van Westen's Avatar Peter van Westen ADMIN
T3 would have to pass the contents of the loadBlock through the onContentPrepare event (for content and system plugins).
Otherwise Modules Anywhere won't be able to see the {modulepos} tag till after the html head is rendered and fixed (onAfterRender).

Joomla will throw that error when extensions (like modules) try to load css/js files at that stage.
Please post a rating at the Joomla! Extensions Directory
Thomas A.'s Avatar Thomas A.
Hi! I made kind of a workaround, where i overwrite the moduleCache helper method

abstract class ModuleHelper extends _ModuleHelper {
public static function moduleCache($module, $moduleparams, $cacheparams)

and in case of a locked manager, it uses modulemode 1. that works in our case since we dont have any css / js header infos for those modules.

if i would adjust the T3. where would i need to do so. the replace method modulesanywhere seems to come from onAfterRender.


# Function Location
1 () JROOT/libraries/src/WebAsset/WebAssetManager.php:259
2 Joomla\CMS\WebAsset\WebAssetManager->useAsset() JROOT/libraries/src/Document/HtmlDocument.php:403
3 Joomla\CMS\Document\HtmlDocument->mergeHeadData() JROOT/libraries/src/Cache/Cache.php:507
4 Joomla\CMS\Cache\Cache::getWorkarounds() JROOT/libraries/src/Cache/Controller/CallbackController.php:80
5 Joomla\CMS\Cache\Controller\CallbackController->get() JROOT/plugins/system/t3/includes/joomla4/ModuleHelper.php:136
6 Joomla\CMS\Helper\ModuleHelper::moduleCache() JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:93
7 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() JROOT/plugins/system/modulesanywhere/src/Replace.php:629
8 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processPosition() JROOT/plugins/system/modulesanywhere/src/Replace.php:510
9 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processMatch() JROOT/plugins/system/modulesanywhere/src/Replace.php:698
10 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceMatches() JROOT/plugins/system/modulesanywhere/src/Replace.php:680
11 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replace() JROOT/plugins/system/modulesanywhere/src/Replace.php:81
12 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModules() JROOT/plugins/system/modulesanywhere/src/Replace.php:149
13 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceTags() JROOT/plugins/system/modulesanywhere/modulesanywhere.php:99
14 PlgSystemModulesAnywhere->changeFinalHtmlOutput() JROOT/libraries/regularlabs/src/SystemPlugin.php:155
15 RegularLabs\Library\SystemPlugin->onAfterRender() JROOT/libraries/src/Plugin/CMSPlugin.php:289
16 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
17 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:111
18 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/libraries/src/Application/CMSApplication.php:1031
19 Joomla\CMS\Application\CMSApplication->render() JROOT/libraries/src/Application/SiteApplication.php:724
20 Joomla\CMS\Application\SiteApplication->render() JROOT/libraries/src/Application/CMSApplication.php:298
21 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:61
22 require_once() JROOT/index.php:32


Thanks a lot!
Peter van Westen's Avatar Peter van Westen ADMIN
You will have to ask the T3 developers. I have no idea.

The latest dev version of Modules Anywhere will not let the module break the page (so no more WebAssetManager is locked error).
But it will place a html message in the output where the module should be.
So the module will still not be rendered (as the error is still thrown internally).
regularlabs.com/development-releases
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