Kirby 3.3: $pages->visible()

Hi there,

I just upgraded to Kirby 3.3. I can access to my panel but the front-end isn’t available.
I got this message : “$pages->visible() is deprecated, use $pages->listed() instead. $pages->visible() will be removed in Kirby 3.5.0.”

Since I’m not dev, I have no idea what to do :confused:

Should I track all the ‘$pages->visible()’ and replace them by ‘$pages->listed()’ ?
Actually, I looked it up in my files and didn’t find any ‘$pages->visible()’ value.

Any suggestions ?
Thanks for help :slight_smile:

You can fix this temporarily by switching off debug mode.

Go to your config (site/config/config.php) and set debug to false.

Afterwards you can take your time and replace all ->visible() method calls with ->listed(). It’s easiest to use find and replace in an editor like VisualStudio code. Search for ->visible() instead of $pages->visible()

1 Like

Thanks for the debug mode option.
I’ll clean the rest up now.

@ bastianallgeier, I’m strangely still getting some errors while in debug mode even after changing the sole > ->visible() I had to ->listed(). Any clues which direction I should investigate?


Hm, any caching happening? And you have really replaced visible in the projects.php snippet?

1 Like

Indeed, I did not :roll_eyes:. I was only searching for $pages->visible(), when I should have replaced all the $visible() occurrences.

It is now fixed and it works like a charm. Thanks for your help!