I’m getting this error message in the left sidebar in a subpage in my website:
file_exists() expects parameter 1 to be a valid path, string given
It appeared after updating to 2.4.0 and persisted after upgrading to 2.4.1.
In another topic ( Strange new Error Message when editing subpages ) there was a suggestion to rename all the blueprints to remove null bytes from the file names. I tried to do it and it didn’t work.
If i revert to 2.3.2 the panel loads but I also get a warning, more explicit than before:
Warning: file_exists() expects parameter 1 to be a valid path, string given in /Users/w4nderlust/Documents/Lavoro/Sito Web/w4nderlust/kirby/toolkit/vendors/yaml/yaml.php on line 542
Well, instead you should probably verify that there are no null bytes in the blueprint and in its file name. The most reliable way to do this is to delete the blueprint and retype it.
Sure Lukas, the trick was there just to demonstrate that null characters are the issue.
Anyway my process is coding on my mac and uploading with cyberduck. I never purposedly uploaded files with null character in them and I have no idea of how they could have been added.
This evening I will try removing them somehow and let you know if it solves the problem. But are you sure it’s about the blueprint? I find more plausible that it has to do with uploaded file names, as the original pdfs uploaded for those pages contaned characters like :, ", '. So maybe kirby’s sanitizer substitutes them with null chars somehow? Or maybe it did it in previous versions, as I started working on that a long time ago (may 2015)
I tried renaming the blueprint, editing it’s content to remove the nuls with unix command tr and also to create a new file and retyping it completely. Nothing changed
if I set debug = true at site level, when I get into pages with that blueprint (publication.php) I get the problem on the left panel that I showed you, but I discovered that if I try to create a new publication page, I get the full error report. I’m attatching it here for you to see
If you want to investigate further I can zip my full website and send it to you, it’s about 40mb so it’s not too big.