Local websites error

The local versions of my Kirby3 websites since today all show the following error message in the panel instead of displaying the listed pages:

Der Bereich "listed" konnte nicht geladen werden: Cannot use "parent" when current class scope has no parent

The online versions of the sites work correctly.

What could be the reason?

Is this on the Panel dashboard? Then please post site.yml

Site.yml content is:

title: Site
preset: pages
unlisted: true

Are you trying to tell us that this affects multiple local Kirby installations?

What did you change?

Do you get anything more useful in your php error logs maybe? Or in the console?

What is your local dev environment?

Yeah, it’s also happening on another Kirby3 site that I haven’t worked on in weeks.
I don’t think it’s MAMP. Because on older MAMP versions, where everything used to work, the Kirby sites show the same bug.

How can I get php error logs?

Console shows the following errors:

{"status":"error","route":"site\/sections\/([a-zA-Z0-9\\.\\-_%= \\+\\@\\(\\)]+)","exception":"Kirby\\Exception\\PermissionException","message":"Unauthenticated","key":"error.permission","file":"consens-kirby3\/kirby\/config\/api\/authentication.php","line":12,"details":[],"code":403}

in ‘http://localhost:8888/consens-kirby3/api/site/sections/listed?page=1

and an object error in ‘app.js’.

Maybe I should switch my computer off and on again.

When something that worked yesterday stopped working, then I guess something has gone wrong in your setup. That’s the project you sent me a couple of days ago.

Yes. But the online version shows the listed pages in the panel, the problem is only local. If it was the setup, the error should be there too, right?

No, I mean your local dev environment, or you file/folder permissions or whatever. I would suspect that you changed something. After all, the project you sent me a few days ago works as well.

Have you tried to clear the files in the session folder? The browser cache?

Have you updated Kirby? Looks like you are also not using an up-to-date version, if I go by what you sent me, which is 3.2.3 (although that shouldn’t cause the issue).

Did you update plugins without updating the core? Anything else?

It was MAMP’s doing after all.
I changed the PHP version there from 7.4.2 to 7.3.9, then the listed pages were shown in the panel again.

Thanks for your support.

2 Likes

Can confirm, I had exactly the same problem.

With which version of Kirby?

I tested with Mamp Pro set to PHP 7.4.2 and Kirby 3.3.5 without running into this issue.

Ok I checked it - the issue was caused by the old Kirby Version 3.2.3. Kirby 3.3.5 worked fine as you stated. Like @Gert it affected all my local projects because they were all based on the same Kirby Zip.

Great, thanks for your feedback, it was then caused by missing PHP 7.4 support in older Kirby versions. PHP 7.4 support was added in Kirby 3.3.2.

In general, always make sure to use the latest version because we continually fix issues.