Open mike-kramer opened 6 years ago
Yii project root is PhpStorm project root?
Yes. And I tried to point Yii root in plugin settings - no result. And I've just updated PhpStorm to 2017.3.6 - the situation is same. Once plugin found my views, but after a couple of hour it doesn't again.
I've tried this: Now plugin finds my views
Same problem.
PhpStorm 2017.3.6 Plugin 0.8.42.5 Yii project root is PhpStorm project root.
I still have the same problem. This problem appeared about 2 months ago. Before that it worked perfectly.
PhpStorm 2017.3.5 and also in PhpStorm 2018.1
I have this problem only with my old projects. Today I started new Yii2-project, and plugin works with it perfect.
I'm also have this problem. With a new project this is work perfect. I try use PhpStorm 2017.3.x and PhpStorm 2018.1
View file for "create" not found in "/modules/modules/[name]/views/[name]/create.php". less... (Ctrl+1) Reports missing view templates
I don't know why it creates double path 'modules'
my path to /modules/[module_name]/frontend/views
do not recognizing too.
i found it to.
In our team projects i use such structure: /modules/[module]/views/[web_end]/[controller]/view.php if you add support, i'd be grateful.
see my picture.
if there is a missing view, it creates it. the path is correct. but after creation it does not find it any more.
our modules structure is: /modules/[module]/[web_end]/views/[controller]/view.php
thanks for your help
Баг появился с версией 0.8.38 Откатился на 0.7.35.2 - все стало в порядке. Посмотри, что менял между этими версиями. Возможно быстро поймешь причину. Все, что выше 0.8.38 сломано (перепробовал все от 0.9.54.9)
@a6ka в версии 0.8.* была полностью переделана работа с вьюхами. Как закончу с миграциями, вернусь к вьюхам.
Same here with version 0.10.56.15 and PhpStorm 2018.2.1 (Linux). However, the concering project contains just a Yii module, but with normal controllers, models, views. Can it also be related to the namespace? If I let the view file be created the namespace of the current controller gets used, but my namespace has some additional elements prepended, so the view file does not get created at the correct position. Therefore my guess is the Yii root path setting is not enough - there should be also a namespace setting so that view files gets created into the right directory.
I have another project that was originally an yii2-advanced project and here SOME view files can be found (a pity when 'it works sometimes' ... ;-) ) There is one controller with the correct view file linking option: If I choose 'Go to declaration' I have to choose between the correct one and vendor/codeception/base/tests/data/app/controllers.php. Other controllers show a red line under the view file name, but 'Go to declaration' works anyway and leads again to the test file.
Btw one question: what happens if the Yii root path setting is blank? Will then the regular project root path be used? It seems to me that I don't have to populate this setting. Could you add this to the Readme file, please?
In some projects it works fine and in some it does not work at all. I compared settings for the "Yii2 Support', but found no differences.
What can we do to fix this? Any workarounds?
Использую версию 0.10.56.18.
Не видит view подключаемых через $this->render() в контролерах, выдаёт ошибку
View file for views not found in /modules/modules/production/views/frontend/products/view.php
предлагает создать представление.
Если создать, то файл создаётся по пути
app\modules\modules\production\views\frontend\products
Используется темизация или нет - не играет роли.
Специально создал проект, настроил темизацию, все представления в контролерах определяет.
Modules are located at/root/common/modules
, but module controllers are giving view not found error. Controller namespace is modules\[module]\controllers
and plugin is looking at '/root/common/[module]/views
instead of /root/common/modules/[module]/views
.
Plugin version v0.10.56.22
I just found this thread and am experiencing the same problem--view files are not recognized within controllers.
View file for "contact" not found in "//views/site/contact.php". Inspection info: Reports missing view templates
PhpStorm 2018.3 Build 183.4284.150 Yii2 Support version 0.10.56.22
Same issues with 2019.1 EAP!
Same issue, 2019.1. Is there any solution?
Still not fixed, searches for /modules/modules/{module}/views dir.
Still no solution, can it be reverted back to simple ../views resolve, this is more common to yii development. Or add it to a config to use this not the advanced one, which cannot really handle complex projects? @nvlad i know you are busy but maybe it would be a quick fix, and than many of us could use view part correctly.
our project structure is: /modules/[module]/[app]/controllers/[controller]Controller.php /modules/[module]/[app]/views/[controller]/view.php /common /backend /fronted
but app directories dose not have any controllers, views inside, only web root, and config.
now it creates the view file in controller action, but after successfully creation it does not find any more. if i am in a view render() does not complete.
i am using the latest plugin version. (i tried to use more version over time, but none of them fixed this issue)
thanks for your time!
Just discovered that removing the defined view path and root path fixes it for the advanced template. Well at least for now, hopefully it keeps working. It is probably not ideal, but at least it finds now views related correctly to backend/frontend folder.
in .idea/yii2settings.xml I just deleted those lines:
<option name="yiiRootPath" value="C:\laragon\www\..." />
<option name="viewPathMap">
<map>
<entry key="@backend/themes/*/modules" value="@backend/modules" />
<entry key="@backend/themes/*/widgets" value="@backend/widgets" />
<entry key="@backend/themes/*" value="@backend/views" />
<entry key="@frontend/themes/*/modules" value="@frontend/modules" />
<entry key="@frontend/themes/*/widgets" value="@frontend/widgets" />
<entry key="@frontend/themes/*" value="@frontend/views" />
</map>
</option>
edit: 🤯10mins later and it stops working !?
The only working variant found for now is to set alias like this:
And then use alias in render function:
return $this->render('@frontend/views/abc/xyz');
Still not working. Fix it plz.
Still not working. PHPStorm 2019 modules/modules/[my_name_module]/* not working only basic
Everyone complaing about not working please check the solution from @mike-kramer from Mar 28, 2018. Adding one line in the theme path maps helps.
It helped for me. Clear Yii Root Path
in settings.
Use usual modules structure:
/modules/[module]/views/[controller]/index.php
The problem was. Didn't find it before. It's trying to create here:
/views/[controller]/index.php
(Not in module folder)
Version 0.10.58.52
breaks again. The decision to install version 0.10.58.37
In all my working controllers and widgets your plugin show it can't find a view file
Additional info