mikitex70/redmine_drawio

error save draw.io in wiki page (redmine:3.4.12)

Closed this issue · 6 comments

Hello,
we have been using your plugin nicely for a long time, but recently when I save a modified drawing inserted by the macro drawio_attach I got the error

Make sure that the WebDAV functionality of the DMSF module is enabled

the log say

Started POST "/uploads.json?filename=sistema%20domus_13.png" for 127.0.0.1 at 2020-04-30 17:52:52 +0200
Processing by AttachmentsController#upload as JSON
  Parameters: {"filename"=>"sistema domus_13.png"}
  Current user: c_giuliodori (id=3)
Saving attachment '/home/redmine/data/files/2020/04/200430175252_948306f68efc392d43e0bc9d646e2785.png' (176913 bytes)
  Rendered attachments/upload.api.rsb (0.9ms)
Completed 201 Created in 95ms (Views: 2.2ms | ActiveRecord: 59.0ms)
Started GET "/projects/domus-amministrazione-di-sistema/wiki.json?include=journals" for 127.0.0.1 at 2020-04-30 17:52:52 +0200
Processing by WikiController#show as JSON
  Parameters: {"include"=>"journals", "project_id"=>"domus-amministrazione-di-sistema"}
  Current user: c_giuliodori (id=3)
  Rendered wiki/show.api.rsb (13.4ms)
Completed 200 OK in 108ms (Views: 57.6ms | ActiveRecord: 25.2ms)
Started PUT "/projects/domus-amministrazione-di-sistema/wiki.json" for 127.0.0.1 at 2020-04-30 17:52:52 +0200

ActionController::RoutingError (No route matches [PUT] "/projects/domus-amministrazione-di-sistema/wiki.json"):
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  vendor/bundle/ruby/2.3.0/gems/railties-4.2.11.1/lib/rails/rack/logger.rb:38:in `call_app'
  vendor/bundle/ruby/2.3.0/gems/railties-4.2.11.1/lib/rails/rack/logger.rb:20:in `block in call'
  vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'
  vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:26:in `tagged'
  vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:68:in `tagged'
  vendor/bundle/ruby/2.3.0/gems/railties-4.2.11.1/lib/rails/rack/logger.rb:20:in `call'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
  vendor/bundle/ruby/2.3.0/gems/rack-1.6.11/lib/rack/methodoverride.rb:22:in `call'
  vendor/bundle/ruby/2.3.0/gems/rack-1.6.11/lib/rack/runtime.rb:18:in `call'
  vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.11.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.11.1/lib/action_dispatch/middleware/static.rb:120:in `call'
  vendor/bundle/ruby/2.3.0/gems/rack-1.6.11/lib/rack/content_length.rb:15:in `call'
  vendor/bundle/ruby/2.3.0/gems/rack-1.6.11/lib/rack/sendfile.rb:113:in `call'
  vendor/bundle/ruby/2.3.0/gems/railties-4.2.11.1/lib/rails/engine.rb:518:in `call'
  vendor/bundle/ruby/2.3.0/gems/railties-4.2.11.1/lib/rails/application.rb:165:in `call'
  vendor/bundle/ruby/2.3.0/gems/railties-4.2.11.1/lib/rails/railtie.rb:194:in `public_send'
  vendor/bundle/ruby/2.3.0/gems/railties-4.2.11.1/lib/rails/railtie.rb:194:in `method_missing'
  /home/redmine/data/tmp/bundle/ruby/2.3.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:605:in `process_client'
  /home/redmine/data/tmp/bundle/ruby/2.3.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:700:in `worker_loop'
  /home/redmine/data/tmp/bundle/ruby/2.3.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:548:in `spawn_missing_workers'
  /home/redmine/data/tmp/bundle/ruby/2.3.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:144:in `start'
  vendor/bundle/ruby/2.3.0/gems/unicorn-5.5.1/bin/unicorn_rails:209:in `<top (required)>'
  vendor/bundle/ruby/2.3.0/bin/unicorn_rails:22:in `load'
  vendor/bundle/ruby/2.3.0/bin/unicorn_rails:22:in `<main>'

Can you help me?

thanks,
Costantino

Hi @ilkosta, the drawio_dmsf macro uses the WebDAV functionality of the DMSF plugin to save diagrams.
But that functionality must be explicitly enable in the DMSF plugin configuration: go to the Administration page, click on Plugin, find the DMSF plugin and in the right there is a Configure link, which takes you to the plugiin configuration page.
Scroll down and find the WebDAV section. The first field (WebDAV) must be set to Active.
Make sure also that the next file (WebDAV strategy) is set to read/write, otherwise the diagrams cannot be saved.

Hi @mikitex70 the point is that we are using the drawio_attach and not drawio_dmsf
In the past dmsf was installed but never used and then removed.
The years and versions of redmine have passed, but the plugin has never been installed again.

Updating a documentation written by a supplier where draw.io had been used with drawio_attach macro, I realized that it no longer updated the attached image.

Can you tell me the versions of Redmine and the Drawio plugin?
I will try to reproduce your issue. In the meantime I will do some test with Readmine 3.4.6.

I'm using redmine 3.4.12 by https://github.com/sameersbn/docker-redmine
In the attachment the list of installed plugins (in csv format)
plugins.csv.txt

Thank you very much for everything and let me know if I can somehow investigate the problem.
I don't know Ruby but redmine and its plugins are now so useful and well made that any in-depth analysis will be an excellent source of learning.

Found the problem, it affects only the main wiki page.
Try the new version, it should fix the issue.
Thanks for reporting.

simply awesome