How to reduce FC Universal Module Duplicate Database Queries?

More
5 years 3 months ago - 5 years 3 months ago #75699 by ggppdk
Hello

the plugins seem to be triggered twice here:

#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()

#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()

> self::processText('text', $article, $helper, $method, $params, $ignore);
> self::processText('introtext', $article, $helper, $method, $params, $ignore);

which causes module to be executed twice, this is not directly related to flexicontent
- since if a a module involves queries, and module is loaded twice, then queries will be executed twice

note in the free version (you have pro version ?) i tested the line numbers on the file are not the same so they above lines seem to be the closest match


-- 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 3 months ago by ggppdk.

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

More
5 years 3 months ago #75700 by iamrobert
Thanks - I have the PRO version:

/home/taichung/public_html/can2/libraries/regularlabs/src/Article.php

I think this is the code:
Code:
private static function processText($type = '', &$article, &$helper, $method, $params = [], $ignore = []) { if (empty($article->{$type})) { return; } if (in_array($type, $ignore)) { return; } call_user_func_array([$helper, $method], array_merge([&$article->{$type}], $params)); }

I will pass on your comments.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.269 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