Stuck on upgrade
Typed static property Filament\Resources\Pages\Page::$resource must not be accessed before initialization
We get the above error. Trace does not go outside vendor code so it doesn't seem to be custom code. Any ideas?
12 Replies
It will be outside vendor code, I suspect you are calling the resource or model somewhere and it's inheirted by vendor code or extended. Is this on a specific page?
No, it's on post autoload command and basically everywhere. I will check.
So, turns out I forgot to declare the global resource var on one of my pages. In Filament 2, this didn't cause issues, in 3 it did.
to
The error was a bit vague though. Took a bit of debugging π
Good stuff, we will add it to the V3 upgrade docs. I suspect that's when people have created their own pages.
Yes, this was a custom page, sorry for the late reply.
@ToonVD can you provide the whole start of your file to the mount function?
The one that fixed it? Yes, hold on
Yeah please, just need to know where it was extending from etc as it's a custom page it may have been setup slightly different than anticipated
Thank you!
So I am trying to solve the issue with that's caused this, do you have a full pre and post upgrade copy? You can send me a DM with them if you prefer. So I can see what's happening
You want both the resource and the page itself? I can send a Git diff
yeah before and after the upgrade, I've got a feeling the upgrade script is changing somehting between the two itterations depending on how the custom pages have been created
In PM
Did you manage to reproduce?