custom pages not being detected
Following these docs: https://filamentphp.com/docs/3.x/panels/resources/custom-pages
I was able to make everything work on Project A so I understand I need to add them to
getPages()
, i created an extra settings one just to make sure im not hallucinating and I did get it working
Project A - AdminPanelProvider
Project B - ManagePanelProvider
The only difference that I can see is that I did not use admin, but the word manage.
Solution:Jump to solution
```php
public static function getPages(): array
{
return [
'index' => Pages\ListTasks::route('/'),...
36 Replies
In the sidebar for project b. I do see the overdue accounts page showing up
Its even doing the navigation badge correctly
I see that it is being registered in the routes
For additional testing,. the Settings.php page on both projects is just a custom one
And I can't access it on the ManagePanelProvider project, but it does work on the one that is AdminPanelProvider
Now I am failry confident, and also hopeing that this is not the reason why its not working lol
Geuninly am blanking on what I could have done, for none of the custo mpages to work
I have reached a point where il send $50 on paypal for help, i spent way to many hours on this haha 🙏
The URL i am trying to access is
But when i do the /settings on the other project, it does work.
And once more, yes. I did create the
/settings
page on the other project 5 min ago, to double check that I can get it working. So I am not totally incompetent lol
error
I am getting 404 | Not Found
Nothing is being added rto the laravel log file eitherand for proof, i did get it working on the other project lol
littearlly blank page, and idk what I am doing different, since its littearly 1 command and adding to resoruce
I just tried it on another project where the panel is called Agency and it doesnt work either
seems it only works on Admin? i dont understand
Have you added the rendering code to the view page?
Littearlly jsut gnerated it as a ListRecord did nothing else, trying to go to the url and it doesnt work, but on the other project where the panel is admin name, everything work when i make the same page
Like in the getPages?
It works on another app where I have the /admin/ route name but any project where i didint call it admin, noen of the custom pages work
i remadet he project, called the panel agency, now i cant do anything custom 😦
but it shows up in routes and e verything
Sorry struggling to keep track of everything you are saying.
Is there a page that's not registering in your new app? but you can access it directly?
Okay so, I have 2 projects. They both are essentially the same.
Project A< when i was installing filament. I used the name admin the suggested one. When I do the commands to create custom pages for ListRecords ect, and add it to getPages() everything works as intented. No issues, its perfect.
Other Projects, when I install filament and call the panel manage agency or anything but admin i dod the commands to the custom pages, the same exact ones. And none of them work across 3 projects now. I do the command to view routs, and its reigstered and shows up. I can even add to the navigation sidebar on the side and it will show the badge icons and stats. But when u click on it, the urlr throws 404
And you ran a php artisan cache:clear
I can dd
dd(TaskResource::getUrl('inbox'));
And it shows
and i go to that page nad its 404
hmm let me try that 😅
Ok, as a random test, add a canView function to that page and set it to true
naa doesnt work, still get 404 after cache clear, i did route clear stuff too
theory that should trigger a 403 but worth a try
one moment
But if i go to the other project I just ran the command to make inbox page. Just registered it, nothing else
only diffrence is admin vs agency lol
What version of filament?
3.2.73
Is the page added into the new panels folder? or the admin folder?
Just on the TaskResource getPages for both projects
Solution
omg how
wow
lol
it's looking for a 'record' with the key of 'inbox'
dude you are a meistro
it's the same as normal route files, the order still matters. 🙂
im going to remember this forever haha, tytytyty so much for the help with this wow
no worries, happens to us all
I had to take out to dogo today to solve this haha
was going in circles going through both projects, genuinely lostt on what is happening