agileware-jp / redmine_issue_templates

Redmine Issue Template. Pull requests, reporting issues, stars and sponsoring are always welcome!
https://www.redmine.org/plugins/redmine_issue_templates
GNU General Public License v2.0
65 stars 28 forks source link

Compatibility with the Redmine WYSIWYG Editor plugin #97

Open albrechtd opened 2 months ago

albrechtd commented 2 months ago

Summary

The plugin is apparently not compatible with the Redmine WYSIWYG Editor plugin. I reported this WYSIWYG Editor issue, but it seems not easy to fix it there, so I kindly ask for more insight.

Description

Using the Issue Templates and WYSIWYG Editor plugins together, selecting a template throws the following Javascript exception in Firefox. The expected operation (fill in the template) is not performed in the WYSIWYG (“Visual”) editor:

Uncaught (in promise) TypeError: ns.setRelatedLink is not a function
    replaceTemplateValue https://redmine/redmine/plugin_assets/redmine_issue_templates/javascripts/issue_templates.js:195
    replaceTemplateValue https://redmine/redmine/projects/it-support/issues/new:235
    loadTemplate https://redmine/redmine/plugin_assets/redmine_issue_templates/javascripts/issue_templates.js:143
issue_templates.js:195:8

I presume this is related to the code in the WYSIWYG Editor which tries to catch (?) the new template. The same issue occurs when replacing or removing the template, btw.

Please note that these two plugins did actually work together (see this WYSIWYG Editor issue).

Environment

Visual Proof / Screenshot

See message (from the browser's JS console) above.

Expected Results

Both plugins should work together…

Actual Results

See above.

Workaround

Using this timeout hack gives a usable (afaict) result, but IMHO this is not a proper solution for the issue.