Closed norgeindian closed 6 months ago
Hello @norgeindian,
To confirm module locations, please clarify: are all of your modules situated within the default Magento source root, which is typically the 'app/code' directory? If not, have any custom source roots been configured?
Regards,
@bohdan-harniuk , we have our custom modules in the src
directory and this directory is also added to the project:
The strange thing is, that some of the modules are present in the dropdown and some are not. Do you see any other reason which could lead to this behaviour?
@norgeindian,
Yes, there is a possibility that some modules might not be added to the index. This can only occur if the registration.php
file contains content that the plugin is unable to parse.
To check whether the target modules are indexed or not, please install the Index Viewer module.
Once installed, follow these steps to locate the missing module:
If the target module is not found, it is likely that the registration.php
file could not be parsed. In this case, it would be helpful if you could provide the content of the registration.php
file, replacing the module name with something like XX_YY if necessary.
But before doing so, you can check if reindexing would help:
Thank you,
@bohdan-harniuk, thanks for the detailed explanation. My issue is somehow interesting. The module is properly indexed, but not shown in the dropdown anyway. Reindexing did not change anything. What else could I try?
@norgeindian, could you please capture a screenshot of the steps involved in creating a plugin? Actually, I am interested only in the screenshot of the action that you choose + dialog where you configure it.
@bohdan-harniuk , I just checked again and found out, that this action comes from the official Magento plugin and not from your module. I'm terribly sorry.
@norgeindian, you can always generate Magento 2 plugins with Atwix plugin. You should be able to see all the modules here.
Generate..
action groupBefore Plugin...
/After Plugin...
/Around Plugin...
actionAlternatively:
Before Plugin...
/After Plugin...
/Around Plugin...
actionCould you please check it?
Regards,
@bohdan-harniuk , thanks for the explanation. That works indeed and there I see all existing modules. Thanks for your help.
How is decided, which modules are shown in the mentioned functionality? We have about 50 custom modules, all under the same namespace and in the same folder, and only about 10 or 15 can be chosen in the popup.