I’m upgrading a project to Kirby 3 and now get issues with the blueprints that I couldn’t find a solution for. So hopefully someone can help me out here or give me a hint.
If you need more info, let me know what exactly I should provide as well.
On panel pages (actually all of the pages get redirected to /panel/site) I get the following error:
The section “pages” could not be loaded:Kirby\Cms\Blueprint::extend(): Return value must be of type array, int returned
site.yml:
title: Site
columns:
- width: 1/2
sections:
pages: true
- width: 1/2
fields:
title:
label: Title
type: text
@pixelijn Thanks, forgot about the title issue again. Unfortunately, this isn’t solving the described error. I even took your example as the site.yml blueprint and it outputs the exact same error as before. So I assume the issue is somewhere else than the blueprint itself?
It’s the only code I currently use. It’s still returning the same error. That’s why I think it must have to do something with the upgrade, however I have no clue where to start. I used the upgrade guide and the project doesn’t have too much custom stuff in there anymore.
Unfortunately, I don’t have any starting point for debugging this here now. If anyone has an idea, let me know.
I now tried again to use only the site.yml from starterkit. It results in the same error, also when flushing content from site.txt file.
I reinstalled the kirby folder via composer as well (3.5) so not sure what else I could do now.
What I still don’t understand is that there’s no extend property used anywhere so far and it made the entire panel non-working, even though this error was just in one of the many blueprints.
Could this be improved, either in the error reporting or better in the way how blueprints are loaded individually?
Kirby has to read the blueprints of stuff it loads, for example, to determine if a page may be shown in a section or not (think read: false).
The error message at least gave a hint what was wrong, and I think it probably refers to some sort of inner extending happening here without you actually having to extend something explicitly in a blueprint. But yes, the error message could be improved.
It’s something that is also worth a note in the docs.