View [filament.pages.*filename*] not found.
I have this error on my Filament. However, it only appears on pages that were created with infolist, and in app/filament/pages/ and resources/views/filament/pages/
And the curious fact is that it works perfectly on localhost, but when I put it on hosting and access the website, these pages return this error.
I already checked:
-> File names (example.blade.php)
-> Paths
-> File code (example.php)
-> Redirection (protected static string $view = 'filament.pages.example';)
-> Permissions on files (I put all 777)
And as I said, it works 100% on localhost and that has me intrigued!
Can anyone help me?
18 Replies
If you click Expand Vendor Frames, and go through the backtrace, you may find where it's getting triggered.
Also ... are all the files from your local actually present on the hosting server? Are you certain?
Yes, all files. I'm using hostinger hosting, so what I did was compress all the files into .zip and extract
Well ... if it works in one place, and not the other, and it's saying the file isn't found ... then ... well, maybe it's not actually there
Right, and if you click on each of those steps in the left, you're stepping backwards through the commands that were executed, and you can see where certain things were called. Obviously some of them are just helper scripts and may not contain obvious clues. But some will. Like what's it doing in that BasePage one? What was passed to it from an earlier stage? What naming-convention is it using to lookup files? What actual filesystem path is it pointing at?
And on localhost it works fine.
The same files...
If I send you the page link and login, you can view it from there... would that be better? I'm new here lol.
Oh and don't worry, it's a test application so there's no problem sharing access.
Did you run
artisan filament:upgrade
on your server?I will do it now
The same error continued in production.
When accessed via localhost, it works perfectly.
https://flareapp.io/share/VP64K2a5
Flare
View [filament.pages.whatsapp] not found. - The error occurred at https://vistune.com.br/admin/whatsapp
Here is the stack
It’s probably some kind of cache and nothing we really can help.
Have you ever seen this where it works on localhost and doesn't work in production?
how does your local
.env
compare with the .env
on the production server? (Obviously, don't post database passwords and other sensitive things here)They are identical to each other.
One question, should I install something via ssh? I just put the compiled file on hosting.
Yes. If you search this Discord there are various other questions and I think most of the time it just magically worked after some time.
I understand almost nothing about laravel, I'm starting now lol.
If you have to do some kind of configuration in the hosting's ssh, the error could be there... I didn't make any changes.
It worked out!!!
Thanks for the help.... for those who read the chat and have the same problem, use the codes below to clear the caches:
Yes, that would make sense if you simply zipped up the local files and unzipped them onto the server ... because you've probably copied all your local cache files and temporary working files from local onto the server, and the compiled paths embedded in those temporary files won't match the paths to the directories on your server.
It's not really a smart way to deploy to a server. But if you're new to Laravel, you can learn more about deployment in its docs, and in many online articles posted by lots of people.
yes yes!! I'll study more about this, thanks for the help!