alphanodes / additionals

Redmine plugin for easy customization of settings, text and content display by using personal or role-based dashboards (drag&drop), providing wiki macros and act as library for other plugins.
https://www.redmine.org/plugins/additionals
GNU General Public License v2.0
131 stars 43 forks source link

Emoji assets installed in public/images/emojis instead of public/plugin_assets/additionals/images/emojis #138

Closed gramakri closed 2 years ago

gramakri commented 2 years ago

Emoji assets are copied into the public/images/emojis which may not be writable.

To give some context: On Cloudron, we run redmine in a readonly docker container. This means that only specific paths are writable. For plugin assets, this is public/plugin_assets/. This was reported in our forum here.

The code in install_emoji_assets writes into a directory outsite plugin_assets. Is this a bug or do redmine plugins expect to write there?

https://github.com/AlphaNodes/additionals/blob/55312e4fa591d1f6efb0f1cf1705c0200fbc4f70/lib/additionals/gemify.rb#L12 is the code in question. I guess that code should be writing into plugin_assets like https://github.com/AlphaNodes/additionals/blob/55312e4fa591d1f6efb0f1cf1705c0200fbc4f70/lib/additionals/gemify.rb#L33

alexandermeindl commented 2 years ago

Hi @gramakri,

thanks for reporting this. It is not a but, it was on purpose in image directory. But you are right, these images should be moved to plugin_assets. Your suggested change will not work, because images are copied to this directory (because Redmine does not support an asset pipeline). I'll take care of it and let you know, if I changed it.

gramakri commented 2 years ago

@alexandermeindl thanks! I don't have much idea about redmine plugins, so my suggestions are just a stab in the dark :-)

alexandermeindl commented 2 years ago

With my last commit for main branch emojis are copied in a directory within plugin_assets. I suppose this solved your problem.

gramakri commented 2 years ago

@alexandermeindl thanks! the user reported on the forum that the issue is fixed with your latest commit