?
avatar joomlabeat
joomlabeat
14 Jan 2017

Steps to reproduce the issue

After updating a 3.4.8 site to 3.6.5 that uses mod_articles_categories I am getting a Fatal Error on the pages the module appears.
Class 'ContentHelperRoute' not found in modules/mod_articles_categories/tmpl/default_items.php on line 14

Just create a module instance to display the list of categories from one parent category and the error will occur.

Expected result

The module should display a list of categories from one parent category.

Actual result

Fatal Error

System information (as much as possible)

J 3.6.5

Additional comments

The problem is that the default_items.php is calling the ContentHelperRoute, which is not available.
The module has changed at some point from using require_once to load its helper.php and require_once to load the ContentHelperRoute Class inside the helper.php file, but now it loads the said Classes with JLoader::register();

But this way the ContentHelperRoute Class isn't available anymore in the template file.

The fix is to move the call
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

away from the helper.php

and put it in the mod_articles_categories.php

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar joomlabeat joomlabeat - open - 14 Jan 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Jan 2017
avatar infograf768 infograf768 - change - 15 Jan 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-01-15 16:09:01
Closed_By infograf768
avatar joomla-cms-bot joomla-cms-bot - close - 15 Jan 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 15 Jan 2017
avatar infograf768
infograf768 - comment - 15 Jan 2017

Closing as the patch https://issues.joomla.org/tracker/joomla-cms/13590 is already RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13588.

Add a Comment

Login with GitHub to post a comment