JHtml and JGrid conflict

126 views
Skip to first unread message

Veronica Cisneros

unread,
Apr 20, 2013, 12:44:18 AM4/20/13
to joomla-de...@googlegroups.com
JOOMLA 2.5.9

When I want to use JGrid in the back end, I get the error "Fatal error: Cannot redeclare class JGrid in ROOT\libraries\joomla\html\grid.php on line 22"

I found Joomla developers discussing the topic and offering a solution that, from the threads, I believed to have been committed to the CMS back them. However, nor the/a solution appears to work/have been implemented:

The threads to the discussion:



I implemented the solution proposed in thread 1 (i.e):

Jhtml class: 


public static function _($key)
{
list($key, $prefix, $file, $func) = self::extract($key);
if (array_key_exists($key, self::$registry))
{
$function = self::$registry[$key];
$args = func_get_args();
// Remove function name from arguments
array_shift($args);
return JHtml::call($function, $args);
}
$className = $prefix . ucfirst($file);
if (!class_exists($className, false))
//if (!class_exists($className))

{
jimport('joomla.filesystem.path');
if ($path = JPath::find(JHtml::$includePaths, strtolower($file) . '.php'))
{
require_once $path;
if (!class_exists($className, false))
//if (!class_exists($className))

{
JError::raiseError(500, JText::sprintf('JLIB_HTML_ERROR_NOTFOUNDINFILE', $className, $func));
return false;
}
}

but then I am unable to load the whole CMS and I get error "

500 - An error has occurred.

JHtml: :icons not supported. File not found."

Obviously no solution has been found (I am experiencing this in Joomla 2.5.9). 

Is a solution to this in the works? 


Veronica Cisneros

unread,
Apr 20, 2013, 12:54:42 AM4/20/13
to joomla-de...@googlegroups.com
Just to clarify, this has to do with JHtml calling JHtmlJGrid instead of the JGrid class (i.e. joomla.html.html.jgrid vs. joomla.html.grid); hence "Cannot redeclare"
Reply all
Reply to author
Forward
0 new messages