Open michaellenaghan opened 6 months ago
@michaellenaghan Thanks, I've pushed a fix for this.
@michaellenaghan, can we close this issue?
Sorry; I'll verify the fix on Mon.
It looks like this is not fixed.
Notice that File Atom.atom
, File Robots.txt
, and File Sitemap.xml
appear in the menu on the right, but not in the list on the left.
I'll see if I can spot the problem in the code.
It looks like the problem is here:
Specifically, here:
if($c != $nots) $a = array_merge($a, $this->hidePages);
$nots
is the set of optional conditions that turn off page hiding. $c
is the set of those conditions that currently obtain. The intention is to say, essentially, "hide pages if all of the optional conditions currently obtain." What's missing is the possibility that there might not be any optional conditions. If there aren't, the pages should always be hidden.
Here's a possible fix:
if(empty($nots) || $c != $nots) $a = array_merge($a, $this->hidePages);
I've added a test for empty($nots)
.
That's a quick fix, but a better fix might be to test $nots
at the top, and skip building $c
if it's empty. (If $nots
is empty the hidden pages would always be merged into $a
.) It's potentially better not because it's "optimized", but rather because it makes the intention of the code clearer: if there are optional conditions we need to check them before we hide pages; if there aren't, we don't.
@michaellenaghan, thanks for digging into this; @ryancramerdesign, I can confirm that test for empty($nots)
works for me.
Short description of the issue
The
ProcessPageList
module allows you to hide pages "in page list(s)." It does hide pages in the page list — but it doesn't hide them in the Pages | Tree menu.Expected behavior
When you hide pages in the
ProcessPageList
module they should be hidden in the page list and in the Pages | Tree menu.Actual behavior
When you hide pages in the
ProcessPageList
module they're hidden in the page list but not in the Pages | Tree menu.Optional: Screenshots/Links that demonstrate the issue
When you hide pages in the
ProcessPageList
module:they're hidden in the page list:
but not in the Pages | Tree menu:
(Note that the last two screenshots are from a non-superuser.)
Steps to reproduce the issue
Setup/Environment