mikitex70 / redmine_drawio

Macro plugin to embed draw.io diagrams into Redmine wiki pages
MIT License
123 stars 51 forks source link

Failed to execute 'addEventListener' on 'EventTarget': parameter 2 is not of type 'Object'. #127

Closed loui closed 1 year ago

loui commented 1 year ago

Hi!

105 and #120 are similar issues.

Code in a wiki page: {{drawio_attach(activity.xml)}}

Got the message after save: Failed to execute 'addEventListener' on 'EventTarget': parameter 2 is not of type 'Object'.

Environment: Redmine version 5.0.5.stable Ruby version 3.0.4-p208 (2022-04-12) [x86_64-linux] Rails version 6.1.7.2 Environment production

Redmine plugins: redmine_drawio 1.4.6

Thank you, @mikitex70, your great work!

mikitex70 commented 1 year ago

Hi @loui, I've tried with the same configuration and I'm unable to reproduce the issue. Can it be a browser cache issue? It seems that the code was unable to patch the script viewer-static.js coming from embedded.net, and this behavior happens when the viewer-static.js is changed (if so, in Italy it has not yet been updated), or the javascript from the plugin is old. The browser console shows any other indication?

loui commented 1 year ago

Hi @mikitex70!

The console showed these resources were missing completely. It was an installation issue, the public/plugin_assets/redmine_drawio directory was missing. From the redmine main dir the following command fixed it: bundle exec rake redmine:plugins NAME=redmine_drawio RAILS_ENV=production

Thanks again for your great work!