I’ve been looking through module.config, pageController.php, and MvcListeners.php and I just can’t figure out where the module is overriding the active setting for the current page.
I’ve played around with setActive() but I’m not getting anywhere with that.
It doesn’t look like this module’s github issues are being worked on, so I’m hoping to figure this out myself. And hopefully with a few pointers from someone more familiar with the routes and such.
The normal Laminas “active” support in the nav uses the routing parameters to match up the current page with the nav contents and decide which is active. I’d guess that something about Clean URL makes those not match up… maybe different routes are present in the nav vs. what’s actually routing the page view?
Thank you so much for sharing your solution, @adehner! We just ran into this problem this week after installing and activating CleanURL, and I could not for the life of me figure out what was going on.
A tidbit of information to offer: this is only a problem on our default site, as set in the Global Settings for the entire Omeka S installation. We have multiple sites in the same installation, and on all the sites except the default, the Laminas isActive() function still works (in our case, templates with logic like <?php if ($page->isActive()): ?>, for example).