Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Error when accessing my site with index.php
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 3 (Joomla 1.5 compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1

TOPIC: Error when accessing my site with index.php

Error when accessing my site with index.php 17 years, 6 months ago #91

  • chiefaua
I have encountered errors when I wanted to access my site via index.php (as well as with some components, which redirect to index.php directly, for example MyContent).

I found out, that JoomSEF search in such a case the first published menu item in the mainmenu, and displays it.
But it only adds the ItemId variable to $_GET and $_REQUEST. The task and id fields (in my case) were not imported.

So I changed the lines

 
$matches = array();
if (preg_match("/option=([a-zA-Z_0-9]+)/", $QUERY_STRING, $matches)) {
$_GET['option'] = $_REQUEST['option'] = $option = $matches[1];
}
 

around line 50-60 in sef404.php to
 
$params = explode( "&", $QUERY_STRING );
foreach ($params as $param) {
$tmp = explode( "=", $param );
if (count( $tmp ) == 2) {
$_GET[$tmp[0]] = $tmp[1];
$_REQUEST[$tmp[0]] = $tmp[1];
}
}
 


This adds all variables stored in the link in the jos_menu table to the $_GET and $_REQUEST globals, and my site works again ;-)

Best Regards
Tom
  • Page:
  • 1
User Login Empty