CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12456] Navigator breadcrumbs with default page hidden from menu causes php notice

avatar
Created By: Ruud van der Velden (ruudvdvelden)
Date Submitted: Tue May 25 15:04:39 -0400 2021

Assigned To: Ruud van der Velden (ruudvdvelden)
Version: 2.2.15
CMSMS Version: 2.2.15
Severity: Minor
Resolution: Fixed
State: Open
Summary:
Navigator breadcrumbs with default page hidden from menu causes php notice
Detailed Description:
Edge case:

Conditions:
- default page is hidden from menu
- action=breadcrumbs
- showall = false (default)
- no other parameters 

First items in the $nodelist array is empty which gives a notice like:
Notice: Trying to get property 'current' of non-object in/error



modules\Navigator\action.breadcrumbs.php line 97

    // add in the 'default page'
    if( !$have_stopnode && $stopat == $this::__DFLT_PAGE ) {
        // get the 'home' page and push it on the list
$dflt_content_id =
ContentOperations::get_instance()->GetDefaultContent();
        $node = $hm->GetNodeById($dflt_content_id);
$pagestack[$dflt_content_id] =
Nav_utils::fill_node($node,$deep,0,$showall);  <-- should check for a return
value
    }


History

Comments
avatar
Date: 2021-05-25 15:09
Posted By: Ruud van der Velden (ruudvdvelden)

parameter root=-1 fixes this, but anyway, should be checked in code probably
      
avatar
Date: 2021-06-11 18:35
Posted By: Ruud van der Velden (ruudvdvelden)

Fixed in svn for 2.2.16
      
Updates

Updated: 2021-06-12 12:06
resolution_id: 5 => 7

Updated: 2021-06-11 18:35
assigned_to_id: 100 => 18365

Updated: 2021-05-25 15:09
resolution_id: => 5