More than 800+ satisfied clients and counting, since 2010

Blog

How to fix Fatal error: Class ‘ContentHelperRoute’ not found ?

If you get the error after publishing a module/component into your joomla website, then here is an easy fix to it. Add the following code to the file below

 defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.');

For Joomla 2.5.x

require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');
if(!class_exists('ContentHelperRoute')) require_once (JPATH_SITE . '/components/com_content/helpers/route.php');

For Joomla 3.x.x

if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');
if(!class_exists('ContentHelperRoute')) require_once (JPATH_SITE . '/components/com_content/helpers/route.php');

Written by

The author didnt add any Information to his profile yet