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: Fernando Morgado (JoMorg)
Version: 2.2.16
CMSMS Version: 2.2.16
Severity: Minor
Resolution: Fixed
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

Comments
avatar
Date: 2023-10-04 06:28
Posted By: Fernando Morgado (JoMorg)

I believe clearing the exclusions at the beginning of the action is the best
solution: it makes sense to start the action by resetting conditions each time
you call it, except where conditions are set for the duration of the request,
which doesn't seem to be the case.
Fixed in SVN, thanks. 
      
Updates

Updated: 2023-10-04 06:28
resolution_id: => 7
assigned_to_id: 100 => 12532