[Bug]: Uknown view error for all views
Bug description
The plugin cannot find any views. I tried invalidating the cache and reinstalling the plugin, but nothing changed.
Plugin version
8.1.2.233
Operating system
Linux
Steps to reproduce
No response
Relevant log output
No response
Hello. Could you check the Settings, Default view path and Default namespace parameters.
Please, it is very annoying
Could you find all loadViewsFrom and addLocation calls(use Scope > All Places)?
You can disable this inspection for now.
Yes, but the inspection is for all views not just those with custom namespace. Btw The inspection is not the main problem, I have to search for every view usage by name instead of just clicking the icon or using the hotkey
Even the main view is unknown
with custom namespace
Your view in the custom namespace? Did you set it in the settings?
I meant the loadViewsFrom() 2. param is a namespace, but as I said, the plugin cannot recognize the simple view either
If i install the legacy deprecated laravel plugin, it can recognize the views normally
That's really weird. So you don't have any loadViewsFrom calls in the project? It has a default Laravel structure and the views aren't recognized?
I do have
What I am saying is there are many view (like main.blade.php) calls without any namespace, and those are not working either.
The views I am referring to are in the basic laravel structure resources/views folder
does the plugin complete anything in the view('here') call?
Yes, It seems only the ones from the loadViewsFrom call
Can I provide you any additional information about the issue?
I'm not sure. Could you send all .idea/laravel_* files? Here or [email protected]
I fixed the issue. One of the loadViewsFrom call started with '../' instead of __DIR__ . '/'. It is still weird that this prevents the IDE from recognizing views.
Is it in one of the packages or it was your loadViewsFrom?
Yes, my logic is that loadViewsFrom calls override the default settings, since there are a lot of package creators, who overrides the resources/views with own namespace views.
It was mine
Hello, I saw that you already solved your problem, but the solution you provided didn't work for me.
I started looking in the settings and realized that putting a "/" before the views path also solves the problem.
@RicardoAugustoTulio
Could you check your settings? Is Laravel directory empty?
Hello, I saw that you already solved your problem, but the solution you provided didn't work for me. I started looking in the settings and realized that putting a "/" before the views path also solves the problem.
![]()
What the heck? This / just fixed my problem thought.
But why do I have projects without the / prefix and it works?
Can confirm putting a leading slash in default views path resolved it for me too.
My suggestions were suddenly appended with other libraries, eg. <x-livewire-data-tables::select/> instead of <x-utils.select/>. Adding the / fixed this. This also happened about a month ago. Then I decided to reset PHPStorm. Glad to see there is a fix.
After this fix it still suggests the livewire paths after the correct paths btw. If I use the livewire paths I can click on them and they take me to the correct blade file.
@timotee could you send your composer.lock(and .json if possible) to [email protected]?
And maybe some additional parts of the project(service providers, views, etc.). If it doesn't violate NDA.
It's fixed. Thank you all for posting about the issue and sorry that it took so long to fix.
