![]() |
Hello,
I upgraded from version 4.4.4 to version 4.5.1, and I encountered a new error. Previously, to prevent the debug toolbar from appearing on a script or the login page, I had implemented the following in the file `\app\Config\Boot\development.php` : PHP Code: $page = current_url(true)->getSegment(1); However, this no longer works because `current_url` is not accessible on this page anymore. So, I tried to do the same thing a bit further in \app\Config\Events.php: PHP Code: $page = current_url(true)->getSegment(1); Although the `echo` statements indicate the correct path on the tested pages, the toolbar still opens on the login page. It must be a simple coding error, but I can't figure it out. Thank you for your assistance.
Try 'filter system'. Create new filter, test URL from request and disable Toolbar filter.
Or set except. See https://codeigniter.com/user_guide/incom...a-few-uris
But of course!
I've previously implemented similar exceptions for my session management filter. So, I attempted this in "\app\Config\Filter.php" PHP Code: /** However, unfortunately, the toolbar continues to load on the login page.
Cannot reproduce on CI 4.5.1.
Code: --- a/app/Config/Filters.php
Thank you for your help, I've found the solution!
While reviewing your modification, I noticed that the 'extends' of the 'class' wasn't the same in my configuration file. So, I reverted to an original file from version 4.5.1 and forgot to update it, even though it's clearly mentioned at the end of the guide: https://codeigniter4.github.io/userguide...e_450.html After updating the Filter.php and applying your modification, it works as intended. Thanks! |
Welcome Guest, Not a member yet? Register Sign In |