enriquepiatti / Magicento

PHPStorm plugin for Magento developers
115 stars 35 forks source link

[Magento2] Magiciento won't recognize modules #279

Open marmureanuweb opened 6 years ago

marmureanuweb commented 6 years ago

Magiciento won't recognize modules from vendor directory. incomplete-magicento

As you can see in the picture in dropdown appears only some of the modules, to be more specific, only the modules from a vendor. In the left part of the image you can see there are many other vendors.

Any ideea? Thanks!

enriquepiatti commented 6 years ago

Hi @andreiMarmureanu try selecting the modules as editable from Magicento2 settings Are those modules present in that list from Magicento2 settings? Are those modules detected on some other features? Because normally you will have your "editable" modules inside app code, not a custom folder inside vendor... is there any special reason to use that workflow?

marmureanuweb commented 6 years ago

Wow @enriquepiatti fast reply 👍 Seems to be all there, in magicento settings. Our workflow is to use composer as much as possible, and yes after we develop a module in app/code we migrate it to vendor by composer.

I see that is a checkbox "Exclude Test Folders" which is checked by default: image should it work if i uncheck it?

enriquepiatti commented 6 years ago

Exclude tests folders is only for the "test" folder inside vendor modules (to avoid showing those things in autocomplete etc), you can try it just in case, but you say your entire module is not visible,or only the test classes? Is your module listed there in "Editable Modules"?

pocketprogrammer commented 6 years ago

I am also experiencing this issue. The only modules that appear in the "Editable Modules" multi-select field are modules that I created using Magicento and the Magento core modules.

Update If I manually add modules to the "editableModules" node in magicento2.xml it will allow me to use them in magicento actions, but does not add them as options to the "Editable Modules" multi-select field. After manually updating magicento2.xml if I make any changes to the settings it will overwrite my updates and remove the manually added modules from the node value.

marmureanuweb commented 6 years ago

Problem solved, somehow.....because I migrated to a MacOS enviroment. Now...I'm facing more and more problems. I feel like I paid for nothing.... Magicento1 was..great, but the version for the Magento2 has serious bugs.

  1. Try to create module=> image than this appers..."Create Module, action is not available while...indexing" but it wasn't indexing.. image -> result in creating only the module.xml

  2. Try create grid -> Nothing happens

  3. Try create form -> Nothing happens

Ok, maybe a restart should work, and than refresh magicento indexes.

  1. Create controller -> only one module is showing image

  2. Create CRUD model -> only one module is showing image

Ok, lets restart PhpStorm, and refresh index for magicento aaaaaaand "File->invalidate Cache/ Restart". Ok, done all of them, lost all my history, that's it. Trying again....

  1. Create setup files.....only one module is showing -> image -> Hopefully...the class for setup is created corectly.

While...modules are reconized in preference magicento image

  1. Create admin menu ...only one module showing... image

So, I'm kind of dissapointed. I'm not using it all the time, but when I want to use it, I want it..also to work. Please help @enriquepiatti !

enriquepiatti commented 6 years ago

@andreiMarmureanu are you selecting the modules you want to work with on the "Editable Modules" list? Also after selecting all the modules you want to edit there, close the settings and open it again just to check they were saved correctly

marmureanuweb commented 6 years ago

@enriquepiatti So, I found the problem. I go to .idea folder, than saw "magicento2.xml" file image And saw the line "Editable Modules" -> there was only one module. Than i figured out that thorough all the settings done in Preferences -> Magicento, I clicked that module....so I understood that modules need to be selected in order to be editable (which is not really intuitive - this should be mention there in a comment). So, selected all - apply and than it worked. You should mention somewhere in documentation this thing. Even though, some issues from top are not fixed, like....creating a module.

enriquepiatti commented 6 years ago

@andreiMarmureanu what is the problem with create a new module? It continue saying it is indexing and the action cannot be executed? that thing is something managed internally by PhpStorm so it's very weird it only happens with that action...