Call to a member function getId() on null
I have this error "Call to a member function getId() on null" when converting from v2 to v3
In AdminPanelProvider.php
In UserResource
Solution:Jump to solution
Try putting it in a Closure to evaluate it later (if that's supported here)
->url(fn () => UserResource::getUrl('changePassword')))
The issue is, that for the URL you need the current Panel, but you are just in the process of defining that panel....7 Replies
Why are you opening multiple threads with the same issue?
https://discord.com/channels/883083792112300104/1136195454015647826/1136195454015647826
I closed the previous one
Why? Next time please just edit your post instead of double posting.
You still haven't provided the Flare exception as mentioned in #✅┊rules
I don't intend to, and you havent tell me what spcific lacking in the previous post so I closed it
I thought closing it is deleting
Flare
Call to a member function getId() on null - The error occurred at http://localhost:8000/admin/aotps
Solution
Try putting it in a Closure to evaluate it later (if that's supported here)
->url(fn () => UserResource::getUrl('changePassword')))
The issue is, that for the URL you need the current Panel, but you are just in the process of defining that panel.Thanks, it works. I thought It's the same in v2.