How to reduce FC Universal Module Duplicate Database Queries?

More
5 years 9 months ago #75686 by iamrobert
Thanks - its not this page that I am worried about but another site that's more complex, and I have replaced huge gallery in later builds with image field. The problem seems consistent in the sites I have built, but I have only just become aware of it.

I believe the reason its loading 2x is because of modules anywhere as if we set it up:



It triggers the module to load 2x:



and results in many duplicate items:



Page is here: www.taichungdesigner.com/can2/about

Please Log in or Create an account to join the conversation.

More
5 years 9 months ago - 5 years 9 months ago #75687 by iamrobert
Whereas if I change the code to default Joomla load module:




It loads once:



and the duplicates reduce:



Page is here:
www.taichungdesigner.com/can2/content-page/item/777-about_777

So - do you know why this is?

At the moment, perhaps I should just use loadmodule from now on.
Last edit: 5 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
5 years 9 months ago - 5 years 9 months ago #75694 by ggppdk
Hello

this behavior should be same for all kind of modules, right ?
so maybe this is a question is not appropriate to be addressed to the author of modules anywhere ?


but you can do the following to see

edit
/modules/mod_flexicontent/mod_flexicontent.php

Find
Code:
if ( !$show_mod ) return;


and after the above add
Code:
static $call_count = 0; $call_count++; ob_start(); debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); $trace = ob_get_clean(); JFactory::getApplication()->enqueueMessage( '<code>' . $call_count . ' : MODULE TITLE: ' . $module->title . '</code><br>' . '<pre>' . $trace . '</pre>' , 'notice');


You should see the 2 places that the module is created


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 5 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
5 years 9 months ago #75696 by iamrobert
Thanks for helping me with this ggppdk:

I have updated the code:

Modules Anywhere
www.taichungdesigner.com/can2/about

vs

Joomla Default Load:
www.taichungdesigner.com/can2/content-page/item/777-about_777

However - I don't fully understand why it fires 2x.

Regular Labs believes its this issue:


www.regularlabs.com/forum/modulesanywher...h-flexicontent#84979


So - I think I will revert to {loadmodule} - but have to check/test if I can use Chinese in module titles.

Please Log in or Create an account to join the conversation.

More
5 years 9 months ago - 5 years 9 months ago #75697 by ggppdk
Hello

hhmm, i will look at it
but first please paste here the 2 or 3 backtraces that should appear with the code that i gave you


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 5 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
5 years 9 months ago #75698 by iamrobert
Sorry - I thought I would leave it on the page:

Modules Anywhere
www.taichungdesigner.com/can2/about

1 : MODULE TITLE: about

#0 include() called at [/home/taichung/public_html/can2/libraries/src/Helper/ModuleHelper.php:200]
#1 Joomla\CMS\Helper\ModuleHelper::renderModule() called at [/home/taichung/public_html/can2/libraries/src/Document/Renderer/Html/ModuleRenderer.php:98]
#2 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Replace.php:593]
#3 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModule() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Replace.php:333]
#4 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processMatch() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Replace.php:220]
#5 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceMatches() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Replace.php:202]
#6 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replace() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Replace.php:157]
#7 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModules() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Helper.php:81]
#8 RegularLabs\Plugin\System\ModulesAnywhere\Helper->processModules()
#9 call_user_func_array() called at [/home/taichung/public_html/can2/libraries/regularlabs/src/Article.php:238]
#10 RegularLabs\Library\Article::processText() called at [/home/taichung/public_html/can2/libraries/regularlabs/src/Article.php:221]
#11 RegularLabs\Library\Article::process() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Helper.php:31]
#12 RegularLabs\Plugin\System\ModulesAnywhere\Helper->onContentPrepare()
#13 call_user_func_array() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Plugin.php:97]
#14 RegularLabs\Plugin\System\ModulesAnywhere\Plugin->run() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/modulesanywhere.php:49]
#15 PlgSystemModulesAnywhere->onContentPrepare() called at [/home/taichung/public_html/can2/libraries/joomla/event/event.php:70]
#16 JEvent->update() called at [/home/taichung/public_html/can2/components/com_flexicontent/helpers/dispatcher.php:172]
#17 FCDispatcher->trigger() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:1066]
#18 FlexicontentFields::triggerContentPlugins() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:891]
#19 FlexicontentFields::renderField() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:1172]
#20 FlexicontentFields::renderPositions() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:164]
#21 FlexicontentFields::getFields() called at [/home/taichung/public_html/can2/components/com_flexicontent/views/item/view.html.php:199]
#22 FlexicontentViewItem->display() called at [/home/taichung/public_html/can2/libraries/src/MVC/Controller/BaseController.php:672]
#23 Joomla\CMS\MVC\Controller\BaseController->display() called at [/home/taichung/public_html/can2/components/com_flexicontent/controller.php:1222]
#24 FlexicontentController->display() called at [/home/taichung/public_html/can2/libraries/src/MVC/Controller/BaseController.php:710]
#25 Joomla\CMS\MVC\Controller\BaseController->execute() called at [/home/taichung/public_html/can2/components/com_flexicontent/flexicontent.php:266]
#26 require_once(/home/taichung/public_html/can2/components/com_flexicontent/flexicontent.php) called at [/home/taichung/public_html/can2/libraries/src/Component/ComponentHelper.php:402]
#27 Joomla\CMS\Component\ComponentHelper::executeComponent() called at [/home/taichung/public_html/can2/libraries/src/Component/ComponentHelper.php:377]
#28 Joomla\CMS\Component\ComponentHelper::renderComponent() called at [/home/taichung/public_html/can2/libraries/src/Application/SiteApplication.php:194]
#29 Joomla\CMS\Application\SiteApplication->dispatch() called at [/home/taichung/public_html/can2/libraries/src/Application/SiteApplication.php:233]
#30 Joomla\CMS\Application\SiteApplication->doExecute() called at [/home/taichung/public_html/can2/libraries/src/Application/CMSApplication.php:196]
#31 Joomla\CMS\Application\CMSApplication->execute() called at [/home/taichung/public_html/can2/index.php:49]
1 : MODULE TITLE: about

#0 include() called at [/home/taichung/public_html/can2/libraries/src/Helper/ModuleHelper.php:200]
#1 Joomla\CMS\Helper\ModuleHelper::renderModule() called at [/home/taichung/public_html/can2/libraries/src/Document/Renderer/Html/ModuleRenderer.php:98]
#2 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Replace.php:593]
#3 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModule() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Replace.php:333]
#4 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processMatch() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Replace.php:220]
#5 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replaceMatches() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Replace.php:202]
#6 RegularLabs\Plugin\System\ModulesAnywhere\Replace::replace() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Replace.php:157]
#7 RegularLabs\Plugin\System\ModulesAnywhere\Replace::processModules() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Helper.php:81]
#8 RegularLabs\Plugin\System\ModulesAnywhere\Helper->processModules()
#9 call_user_func_array() called at [/home/taichung/public_html/can2/libraries/regularlabs/src/Article.php:238]
#10 RegularLabs\Library\Article::processText() called at [/home/taichung/public_html/can2/libraries/regularlabs/src/Article.php:222]
#11 RegularLabs\Library\Article::process() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Helper.php:31]
#12 RegularLabs\Plugin\System\ModulesAnywhere\Helper->onContentPrepare()
#13 call_user_func_array() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/src/Plugin.php:97]
#14 RegularLabs\Plugin\System\ModulesAnywhere\Plugin->run() called at [/home/taichung/public_html/can2/plugins/system/modulesanywhere/modulesanywhere.php:49]
#15 PlgSystemModulesAnywhere->onContentPrepare() called at [/home/taichung/public_html/can2/libraries/joomla/event/event.php:70]
#16 JEvent->update() called at [/home/taichung/public_html/can2/components/com_flexicontent/helpers/dispatcher.php:172]
#17 FCDispatcher->trigger() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:1066]
#18 FlexicontentFields::triggerContentPlugins() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:891]
#19 FlexicontentFields::renderField() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:1172]
#20 FlexicontentFields::renderPositions() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:164]
#21 FlexicontentFields::getFields() called at [/home/taichung/public_html/can2/components/com_flexicontent/views/item/view.html.php:199]
#22 FlexicontentViewItem->display() called at [/home/taichung/public_html/can2/libraries/src/MVC/Controller/BaseController.php:672]
#23 Joomla\CMS\MVC\Controller\BaseController->display() called at [/home/taichung/public_html/can2/components/com_flexicontent/controller.php:1222]
#24 FlexicontentController->display() called at [/home/taichung/public_html/can2/libraries/src/MVC/Controller/BaseController.php:710]
#25 Joomla\CMS\MVC\Controller\BaseController->execute() called at [/home/taichung/public_html/can2/components/com_flexicontent/flexicontent.php:266]
#26 require_once(/home/taichung/public_html/can2/components/com_flexicontent/flexicontent.php) called at [/home/taichung/public_html/can2/libraries/src/Component/ComponentHelper.php:402]
#27 Joomla\CMS\Component\ComponentHelper::executeComponent() called at [/home/taichung/public_html/can2/libraries/src/Component/ComponentHelper.php:377]
#28 Joomla\CMS\Component\ComponentHelper::renderComponent() called at [/home/taichung/public_html/can2/libraries/src/Application/SiteApplication.php:194]
#29 Joomla\CMS\Application\SiteApplication->dispatch() called at [/home/taichung/public_html/can2/libraries/src/Application/SiteApplication.php:233]
#30 Joomla\CMS\Application\SiteApplication->doExecute() called at [/home/taichung/public_html/can2/libraries/src/Application/CMSApplication.php:196]
#31 Joomla\CMS\Application\CMSApplication->execute() called at [/home/taichung/public_html/can2/index.php:49]


Joomla Default Load:
www.taichungdesigner.com/can2/content-page/item/777-about_777
NOTICE
1 : MODULE TITLE: about

#0 include() called at [/home/taichung/public_html/can2/libraries/src/Helper/ModuleHelper.php:200]
#1 Joomla\CMS\Helper\ModuleHelper::renderModule() called at [/home/taichung/public_html/can2/libraries/src/Document/Renderer/Html/ModuleRenderer.php:98]
#2 Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render() called at [/home/taichung/public_html/can2/plugins/content/loadmodule/loadmodule.php:203]
#3 PlgContentLoadmodule->_loadmod() called at [/home/taichung/public_html/can2/plugins/content/loadmodule/loadmodule.php:116]
#4 PlgContentLoadmodule->onContentPrepare() called at [/home/taichung/public_html/can2/libraries/joomla/event/event.php:70]
#5 JEvent->update() called at [/home/taichung/public_html/can2/components/com_flexicontent/helpers/dispatcher.php:172]
#6 FCDispatcher->trigger() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:1066]
#7 FlexicontentFields::triggerContentPlugins() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:891]
#8 FlexicontentFields::renderField() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:1172]
#9 FlexicontentFields::renderPositions() called at [/home/taichung/public_html/can2/components/com_flexicontent/classes/flexicontent.fields.php:164]
#10 FlexicontentFields::getFields() called at [/home/taichung/public_html/can2/components/com_flexicontent/views/item/view.html.php:199]
#11 FlexicontentViewItem->display() called at [/home/taichung/public_html/can2/libraries/src/MVC/Controller/BaseController.php:672]
#12 Joomla\CMS\MVC\Controller\BaseController->display() called at [/home/taichung/public_html/can2/components/com_flexicontent/controller.php:1222]
#13 FlexicontentController->display() called at [/home/taichung/public_html/can2/libraries/src/MVC/Controller/BaseController.php:710]
#14 Joomla\CMS\MVC\Controller\BaseController->execute() called at [/home/taichung/public_html/can2/components/com_flexicontent/flexicontent.php:266]
#15 require_once(/home/taichung/public_html/can2/components/com_flexicontent/flexicontent.php) called at [/home/taichung/public_html/can2/libraries/src/Component/ComponentHelper.php:402]
#16 Joomla\CMS\Component\ComponentHelper::executeComponent() called at [/home/taichung/public_html/can2/libraries/src/Component/ComponentHelper.php:377]
#17 Joomla\CMS\Component\ComponentHelper::renderComponent() called at [/home/taichung/public_html/can2/libraries/src/Application/SiteApplication.php:194]
#18 Joomla\CMS\Application\SiteApplication->dispatch() called at [/home/taichung/public_html/can2/libraries/src/Application/SiteApplication.php:233]
#19 Joomla\CMS\Application\SiteApplication->doExecute() called at [/home/taichung/public_html/can2/libraries/src/Application/CMSApplication.php:196]
#20 Joomla\CMS\Application\CMSApplication->execute() called at [/home/taichung/public_html/can2/index.php:49]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.370 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline