New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom plugin name can't started with plg_ #38254
Comments
Did that work in J3? |
Can't confirm this issue. I created a test plugin here: https://github.com/GHSVS-de/plg_mybaseplugin As long as the mandatory attributes See https://github.com/GHSVS-de/plg_mybaseplugin/blob/main/mybaseplugin.xml#L2-L3 You can also use a custom group (= folder in /plugins/) if you want. The demo plugin can be installed, activated, opened, saved and uninstalled without any issues: |
Same here, also checked with capital letters. So please @ZhukDmitry specify what exactly does not work - error message? How did you install your plugin? you also can append your manifestfile here. |
Difference between : plg_myBasePlugin and plg_MyPlugin This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38254. |
It works in J3, I just trying convert to support J4 Here my test plugin
--- plugin code defined('_JEXEC') or die('Restricted access'); use Joomla\CMS\Component\ComponentHelper; class plgContentplg_zhosmmap extends CMSPlugin
} |
My plugin name and plugin class it is not processed if I change name and files to any other (for example plgzhosmmap), - it works |
Probably I must to name my plugin without plg_, but I did it like the other extensions like rules for j3 (component = com_, module = mod_, and so on) |
Just look at how all the core plugins are named and structured. |
I think (don't know for sure) it's this line that is the reason that plugin base file/classes don't work any longer if they start with Later in the chain loadPluginFromFilesystem() can't find the plugin base file, better: can't find the class: That's new but expected from my point of view. Maybe the plugin lagacy mode works different?? |
Closing as having a pull request. Please test #39954 . Thanks in advance. |
Steps to reproduce the issue
When you try to create custom plugin with name like "plg_MyPlugin" - it doesn't work in Joomla 4
But if you create plugin plgMyPlugin - it works
Expected result
Plugin name can have name started with plg_
Actual result
System information (as much as possible)
Joomla! Version | 4.1.5
PHP Version | 8.0.18
Additional comments
The text was updated successfully, but these errors were encountered: