0

On line 18 of the admin.categories.php file there is

require_once( JApplicationHelper::getPath( 'admin_html' ) );

The Helper Library file has not been modified, it still reads

function getPath( $varname, $user_option=null )
$check = ( ( $varname == 'mod0_xml' ) || ( $varname == 'mod1_xml' ) );

if ( !$user_option && !$check ) {
    $user_option = JRequest::getCmd('option');
} else {
    $user_option = JFilterInput::clean($user_option, 'path');
}

$result = null;
$name   = substr( $user_option, 4 );
...    
case 'admin_html':
    $path   = DS.'components'.DS. $user_option .DS.'admin.'. $name .'.html.php';
    $result = JApplicationHelper::_checkPath( $path, -1 );
    break;

So it's going to wind up building a path '/components//admin..html.php' because the $name and $user_option variables are both empty, right? Then the checkpath fails, which returns null during a failure. None of this code has been modified to my knowledge. So what gives? Anyone point me in the right direction?

The problem this causes is that it throws a fatal error when it can't open a required file. So I can't open the category manager.

DiscontentDisciple
  • 466
  • 1
  • 6
  • 20

1 Answers1

0

So when you select Category Manager from the Content menu getPath() is called with $varname == 'admin_html' and $user_option == null.

That means that as the first if() is true (because null equates to false and $check is false) $user_option gets set to com_categories (the result of the JRequest::getCmd('option'); line)

Then $name gets set to 'categories', so when the switch() get to the admin_html case it is setting $path to /components/com_categories/admin.categories.html.php (assuming the local directory separator is set to / ).

So as that is the right path and that file is normally included on a J1.5 installation something else has gone wrong (or the file has been removed/deleted)

Craig
  • 9,335
  • 2
  • 34
  • 38