プロジェクト

全般

プロフィール

Vote #79945

完了

Raise an exception if the plugin directory name differs from the plugin id

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Plugin API_20
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
20
version_id:
127
issue_org_id:
31110
author_id:
259873
assigned_to_id:
332
comments:
7
status_id:
5
tracker_id:
3
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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

Admin Redmine さんが4年以上前に更新

  • カテゴリPlugin API_20 にセット
  • 対象バージョン4.1.0_127 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0