Modules Anywhere: Fatal error when embedding...

Search
Other Bug Reports questions
Forum

Modules Anywhere: Fatal error when embedding Feed module in a custom module

Basil Clarke's Avatar Basil Clarke
Am upgrading a website to Joomla 4 on XAMPP, using the Cassiopiea template. When I embed a mod_feed module in a custom module I get an error:

0 Call to undefined method RegularLabs\Plugin\System\ModulesAnywhere\Form\Field\ChromeStyleField::setDatabase()

I've tried installing the latest development version of the module, but it makes no difference.

Embedding custom modules within custom modules works fine.

Call stack

Call stack
# Function Location
1 () JROOT\plugins\system\modulesanywhere\src\Form\Field\ChromeStyleField.php:26
2 RegularLabs\Plugin\System\ModulesAnywhere\Form\Field\ChromeStyleField::getTemplateStyles() JROOT\plugins\system\modulesanywhere\src\Replace.php:226
3 RegularLabs\Plugin\System\ModulesAnywhere\Replace::getModuleChromeStyle() JROOT\plugins\system\modulesanywhere\src\Replace.php:488
4 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModule() JROOT\plugins\system\modulesanywhere\src\Replace.php:424
5 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processMatch() JROOT\plugins\system\modulesanywhere\src\Replace.php:601
6 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceMatches() JROOT\plugins\system\modulesanywhere\src\Replace.php:583
7 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replace() JROOT\plugins\system\modulesanywhere\src\Replace.php:65
8 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModules() JROOT\plugins\system\modulesanywhere\src\Replace.php:120
9 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceTags() JROOT\plugins\system\modulesanywhere\modulesanywhere.php:100
10 PlgSystemModulesAnywhere->changeFinalHtmlOutput() JROOT\libraries\regularlabs\src\SystemPlugin.php:149
11 RegularLabs\Library\SystemPlugin->onAfterRender() JROOT\libraries\src\Plugin\CMSPlugin.php:285
12 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT\libraries\vendor\joomla\event\src\Dispatcher.php:486
13 Joomla\Event\Dispatcher->dispatch() JROOT\libraries\src\Application\EventAware.php:111
14 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT\libraries\src\Application\CMSApplication.php:1045
15 Joomla\CMS\Application\CMSApplication->render() JROOT\libraries\src\Application\SiteApplication.php:802
16 Joomla\CMS\Application\SiteApplication->render() JROOT\libraries\src\Application\CMSApplication.php:284
17 Joomla\CMS\Application\CMSApplication->execute() JROOT\includes\app.php:63
18 require_once() JROOT\index.php:32
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Basil Clarke's Avatar Basil Clarke
Development version made no difference. However, what did work was changing Style from Inherit to None or Card (haven't tried the other options).

I tried changing the settings in the plugin to make None the default. But when I got to add a new module it still defaults to Inherit.
Peter van Westen's Avatar Peter van Westen ADMIN
Can you see if you can reproduce the issue with the latest dev version (just uploaded new version)...
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Basil Clarke's Avatar Basil Clarke
Thanks Peter.

That's solved one issue but created a new one!

Embedding a feed module in a module without specifying the chrome now works.

But when I go to set the preferences for Modules Anywhere I get an error message

0 Interface "Joomla\Database\DatabaseAwareInterface" not found
Peter van Westen's Avatar Peter van Westen ADMIN
What version of Joomla 4 are you running on?
Also: clear your Joomla cache...
Please post a rating at the Joomla! Extensions Directory
Basil Clarke's Avatar Basil Clarke
J4.1.5.

I've got caching turned off and I can't find anything in the backend about clearing the admin cache.

Tried reinstalling the development version, but the same error is occurring.

When installing I get an error message

Joomla\CMS\Filesystem\Folder::delete: Path is not a folder. Path: [ROOT]\media\regularlabs
Peter van Westen's Avatar Peter van Westen ADMIN
I mean, empty the admin cache.
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
Never mind... hold on...
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, new try:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Basil Clarke's Avatar Basil Clarke
Oh dear, the latest version is the most problematical yet. Inserting a module with style None or Card both result in an error
The requested page can't be found.

An error has occurred while processing your request.

You may not be able to visit this page because of:

an out-of-date bookmark/favourite
a mistyped address
a search engine that has an out-of-date listing for this site
you have no access to this page

Go to the Home Page

If difficulties persist, please contact the website administrator and report the error below.

0 WebAssetManager is locked, you came late

Call stack
# Function Location
1 () JROOT\libraries\src\WebAsset\WebAssetManager.php:273
2 Joomla\CMS\WebAsset\WebAssetManager->useAsset() JROOT\libraries\src\WebAsset\WebAssetManager.php:201
3 Joomla\CMS\WebAsset\WebAssetManager->__call() JROOT\libraries\src\HTML\Helpers\Jquery.php:49
4 Joomla\CMS\HTML\Helpers\Jquery::framework() JROOT\libraries\src\HTML\HTMLHelper.php:297
5 Joomla\CMS\HTML\HTMLHelper::call() JROOT\libraries\src\HTML\HTMLHelper.php:125
6 Joomla\CMS\HTML\HTMLHelper::_() JROOT\modules\mod_sp_tweet\mod_sp_tweet.php:49
7 include() JROOT\libraries\src\Dispatcher\ModuleDispatcher.php:54
8 Joomla\CMS\Dispatcher\ModuleDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT\libraries\src\Dispatcher\ModuleDispatcher.php:57
9 Joomla\CMS\Dispatcher\ModuleDispatcher->dispatch() JROOT\libraries\src\Helper\ModuleHelper.php:295
10 Joomla\CMS\Helper\ModuleHelper::renderRawModule() JROOT\libraries\src\Helper\ModuleHelper.php:167
11 Joomla\CMS\Helper\ModuleHelper::renderModule() JROOT\libraries\src\Document\Renderer\Html\ModuleRenderer.php:102
12 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() JROOT\plugins\system\modulesanywhere\src\Replace.php:507
13 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModule() JROOT\plugins\system\modulesanywhere\src\Replace.php:424
14 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processMatch() JROOT\plugins\system\modulesanywhere\src\Replace.php:601
15 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceMatches() JROOT\plugins\system\modulesanywhere\src\Replace.php:583
16 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replace() JROOT\plugins\system\modulesanywhere\src\Replace.php:65
17 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModules() JROOT\plugins\system\modulesanywhere\src\Replace.php:120
18 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceTags() JROOT\plugins\system\modulesanywhere\modulesanywhere.php:100
19 PlgSystemModulesAnywhere->changeFinalHtmlOutput() JROOT\libraries\regularlabs\src\SystemPlugin.php:149
20 RegularLabs\Library\SystemPlugin->onAfterRender() JROOT\libraries\src\Plugin\CMSPlugin.php:285
21 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT\libraries\vendor\joomla\event\src\Dispatcher.php:486
22 Joomla\Event\Dispatcher->dispatch() JROOT\libraries\src\Application\EventAware.php:111
23 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT\libraries\src\Application\CMSApplication.php:1045
24 Joomla\CMS\Application\CMSApplication->render() JROOT\libraries\src\Application\SiteApplication.php:802
25 Joomla\CMS\Application\SiteApplication->render() JROOT\libraries\src\Application\CMSApplication.php:284
26 Joomla\CMS\Application\CMSApplication->execute() JROOT\includes\app.php:63
27 require_once() JROOT\index.php:32

What I've now done is revert to the last official version and now it seems to be working flawlessly without the need to specify a chrome style in the tag. If I look at the preferences in the Plugins Manager I see that the default is now set to None, which is what I want. However, originally that setting wouldn't stick, it would go back to Inherited. I suspect that the reason the setting is now sticking is something to do with one of the development versions, if you follow my reasoning.

Anyway, the situation for me personally with this website is that Modules Anywhere 7.15.2 is now working OK.
Basil Clarke's Avatar Basil Clarke
Re your earlier questions:

Joomla 4.1.5 and I can't find how to clear the admin cache in Joomla 4.
Peter van Westen's Avatar Peter van Westen ADMIN
Enable "Prepare Content" in the custom module you are using the Modules Anywhere code.
Please post a rating at the Joomla! Extensions Directory
Basil Clarke's Avatar Basil Clarke
Enable Prepare content... Yes, of course, it occurred to me when I was in bed and then I completely forgot to do it until I read your message just now. If only it could be set as a default setting.
Peter van Westen's Avatar Peter van Westen ADMIN
Happy it solved your issue...
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in