Open 3tlam opened 3 months ago
There is also Page::inventory()
as core method which is why you cannot use it as field name (or if you need to access it via $page->content()->get('inventory')
.
The problem is that the method is marked as internal (which is right as it shouldn't be used programatically by non-expert user), but that's also why it's hidden in the docs reference. Which then of course makes it hard for you to know that it's a reserved name.
Heya
Thanks for the quick reply; yeah I was able to access it using content()
Given your explanation, I am now not sure if this works as expected or not - so feel free to close this :)
Totally expected in code, but a problem in our docs, which is why I moved this to our website repo so we find a solution for our docs.
Description
Hi all!
I think I ran into a bug with a field named
inventory
and accessing it in a page model. The output is:Expected behavior
Access to the field
inventory
, instead I think I get the result of$users->inventory()
^, so a list of filesAdditional context
Maybe this is expected behaviour, but as far as I could find in the docs, it should only be part of
Kirby\Cms\User
?Thank you for all the hard work and the wonderful CMS!
To reproduce
Your setup
K 4.3.0 Plainkit