CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12528] Navigator doesn't clear excluded prefixes in some situations

avatar
Created By: Ruud van der Velden (ruudvdvelden)
Date Submitted: Fri Feb 04 11:39:59 -0500 2022

Assigned To:
Version: 2.2.16
CMSMS Version: 2.2.16
Severity: Minor
Resolution: None
State: Open
Summary:
Navigator doesn't clear excluded prefixes in some situations
Detailed Description:
modules\Navigator\action.default.php 

Line 262:  Nav_utils::clear_excludes();

However, on line 252: if( count($rootnodes) == 0 ) return; // nothing to do.

If the script is returning before clearing the excludes this may become a
problem in subsequent calls to Navigator where the excludes are still present.

Sample code to reproduce the error situation but the content tree and the page
have to meet some specific criteria to actually make things go wrong.

{Navigator start_level='2' excludeprefix="test-"}
{Navigator childrenof="test-1"}

I'd suggest to either clear the the excludes at the beginning of the script or
doing it also before the return on line 252


History