From: SourceForge.net <no...@so...> - 2011-11-07 21:09:19
|
Bugs item #1811479, was opened at 2007-10-11 04:43 Message generated for change (Settings changed) made by trabis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=1811479&group_id=41586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core - Theme manager Group: XOOPS 2.5.x >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Nachenko (nachenko) Assigned to: trabis (trabis) Summary: Showing the right block in the wrong place: Top page wrong d Initial Comment: This report includes a bug and it's fix: Suppose you config a block to be shown on top page and ONLY on top page. Suppose your top page is some module's top page, News module for example. So you open the page and you have News front page and the block. You click on some category's name to see all articles in a category. Block is still there. You click on an article. Block is NOT there. ??? The problem is this: News uses index.php for both showing the front page and the category index page, with leads XOOPS engine into confusion on "what is the front page". Now the good news: a fix. This is the problem: file class/theme_blocks.php , Line 60 $isStart = ( substr( $_SERVER['PHP_SELF'], -9 ) == 'index.php' && $xoopsConfig['startpage'] == $dirname ); Replace with: $isStart = ( substr( $_SERVER['PHP_SELF'], -9 ) == 'index.php' && $xoopsConfig['startpage'] == $dirname && !$_GET); Fix is simple, just check that $_GET object does not exist. If we are in the start module, opening index.php file and there is no $_GET stuff, we must be in the start page. A bit dirty, but it works. ---------------------------------------------------------------------- Comment By: trabis (trabis) Date: 2011-09-16 11:25 Message: Fixed in SVN and waiting for review ---------------------------------------------------------------------- Comment By: D.J. (phppp) Date: 2007-11-15 20:11 Message: Logged In: YES user_id=1001493 Originator: NO A better but still not thorough solution: $isStart = ( substr( $_SERVER['SCRIPT_NAME'], -9 ) == 'index.php' && $xoopsConfig['startpage'] == $dirname && empty($_SERVER[ 'QUERY_STRING' ]) ); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=1811479&group_id=41586 |