Vote #79945
完了Raise an exception if the plugin directory name differs from the plugin id
0%
説明
If the plugin directory name and the plugin id are not the same, the plugin will not work because the required files will not be read.
Example:
If you change the directory name of "redmine_vividtone_my_page_blocks plugin":https://github.com/vividtone/redmine_vividtone_my_page_blocks to redmine-vividtone-my-page-blocks, the following log will be output and it will not work well.
Partial "my/blocks/new_issues" missing for block "new_issues" found in admin (id=1) preferences Partial "my/blocks/neglected_issues" missing for block "neglected_issues" found in admin (id=1) preferences Partial "my/blocks/doing_issues" missing for block "doing_issues" found in admin (id=1) preferences
The problem is hard to solve because you can not notice that the wrong directory name is the cause of the problem.
I think I should raise an exception if there is no directory with the same name as the plugin id.
I attached a patch for that.
journals
I forgot to attach a patch:)
--------------------------------------------------------------------------------
Thank you for posting the patch. I think it would be even better if the exception has a more informative message like the following. With this message, an admin easily understands that he should rename the directory.
<pre>
Plugin not found. The plugin #{p.id} should be installed in #{p.directory}.
</pre>
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
I corrected the error message to include the directory name.
--------------------------------------------------------------------------------
+1 Nice work, quite helpful!
--------------------------------------------------------------------------------
Committed the patches. Thank you for your contribution.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
relates,New,31538,Allow a plugin to be installed in the directory different from the plugin id