Core package of WBCE CMS. This package includes the core and the default addons. Visit https://wbce.org (DE) or https://wbce-cms.org (EN) to learn more or to join the WBCE CMS community.
When show_menu2 is called with SM2_TRIM as 3rd parameter, the navigation disappears on pages without ID (like search results, login, signup).
Seemingly it is caused by the conditions "(is_countable($wb->page)" and so also "count($wb->page) == 0" in line 94f. of the modules/show_menu2/include.php, which are never true.
So, changing the code to
$CURR_PAGE_ID = defined('REFERRER_ID') ? REFERRER_ID : PAGE_ID;
if ( defined('REFERRER_ID') && REFERRER_ID > 0) {
global $database;
$sSql = 'SELECT * FROM {TP}pages WHERE page_id = '.REFERRER_ID.'';
$result = $database->query($sSql);
if ($result->numRows() == 1) {
$wb->page = $result->fetchRow();
}
unset($result);
}
does the trick afaik, but I'm not sure if that really has no unwanted results, and I also wonder why the original code obviously does not work properly any longer.
When show_menu2 is called with SM2_TRIM as 3rd parameter, the navigation disappears on pages without ID (like search results, login, signup). Seemingly it is caused by the conditions "(is_countable($wb->page)" and so also "count($wb->page) == 0" in line 94f. of the modules/show_menu2/include.php, which are never true. So, changing the code to $CURR_PAGE_ID = defined('REFERRER_ID') ? REFERRER_ID : PAGE_ID; if ( defined('REFERRER_ID') && REFERRER_ID > 0) { global $database;
$sSql = 'SELECT * FROM
{TP}pages
WHEREpage_id
= '.REFERRER_ID.''; $result = $database->query($sSql); if ($result->numRows() == 1) { $wb->page = $result->fetchRow(); } unset($result); } does the trick afaik, but I'm not sure if that really has no unwanted results, and I also wonder why the original code obviously does not work properly any longer.