Error with Flexicontent Router

More
1 day 2 hours ago #93601 by thatch10
Hi All, had an error on site with Flexicontent Router on line 1520. This was on Community Builder Pages.

Not a coder but used the AI to come up with a fix. Using latest version from Github as Download from Flexicontent site for the latest version will not install for me.

Replaced
Code:
        // Validate that menu category is really an ancestor of the item's category         if ( isset($globalcats[$mcid]) && !in_array($cid, $globalcats[$mcid]->descendantsarray) && (int) $cid !== (int) $mcid )         {             $menu_item_id = FlexicontentHelperRoute::getItemRoute($query['id'], $query['cid'], -1);             // Load the menu item having the given menu item ID             $menu = Factory::getApplication()->getMenu('site', array())->getItem($menu_item_id);             $query['Itemid'] = $menu->id;         }

with
Code:
        // Validate that menu category is really an ancestor of the item's category         if ( isset($globalcats[$mcid]) && !in_array($cid, $globalcats[$mcid]->descendantsarray) && (int) $cid !== (int) $mcid )         {             if (!class_exists('FlexicontentHelperRoute'))             {                 require_once JPATH_SITE . '/components/com_flexicontent/helpers/route.php';             }             $menu_item_id = FlexicontentHelperRoute::getItemRoute($query['id'], $query['cid'], -1);             // Load the menu item having the given menu item ID             $menu = Factory::getApplication()->getMenu('site', array())->getItem($menu_item_id);             $query['Itemid'] = $menu->id;         }

Not sure enough add in to project but felt it may help someone else with the same issues I experienced.

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

Moderators: vistamedia, joomlacorner, ggppdk
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
Save