vvmruder / redmine_doc_pu

Redmine Wikipage to (eye catching) PDF plugin
Do What The F*ck You Want To Public License
4 stars 3 forks source link

Build Document - Internal Error - undefined method 'redirects_to' #3

Closed rg-ac closed 8 years ago

rg-ac commented 8 years ago

My test-environment is:

The Plugin can be configured and I can compose a document definition. But as soon as I press on the 'Build' link I see an 'Internal error' and inside the production log I found:

Completed 500 Internal Server Error in 46ms (ActiveRecord: 17.5ms)

NoMethodError (undefined method redirects_to' for #<ActiveRecord::Relation []>): lib/redmine/sudo_mode.rb:63:insudo_mode'

rg-ac commented 8 years ago

I've the same problem with RVM/ruby 2.0.0-p643

rg-ac commented 8 years ago

After adding the RedCloth GEM to the Gemfile (instead of using 'bundle exec gem install RedCloth') and executing 'bundle install --without development test' I can create a PDF from a single Wiki page. But as soon I add a link to a second page via [[PageName]] I see a server error with the following in the logfile: NoMethodError (undefined method 'redirects_to' for #..

rg-ac commented 8 years ago

Now with ruby 2.2.4 and Redmine 3.2.1 still the same problem while building a PDF with a wiki page with a internal page reference ([[PageName]]):

Started GET "/doc_pu/build_remote?id=4&project_id=demo" for 10.1.1.116 at 2016-04-05 16:42:40 +0200 Processing by DocPuController#build_remote as JS Parameters: {"id"=>"4", "project_id"=>"demo"} Current user: tuser (id=5) Completed 500 Internal Server Error in 38ms (ActiveRecord: 16.9ms)

NoMethodError (undefined method redirect_to' for #<ActiveRecord::Relation []>): plugins/redmine_doc_pu/lib/latex_wiki_page.rb:36:inblock in to_latex' plugins/redmine_doc_pu/lib/latex_wiki_page.rb:31:in gsub!' plugins/redmine_doc_pu/lib/latex_wiki_page.rb:31:into_latex' plugins/redmine_doc_pu/app/models/doc_pu_wiki_page.rb:24:in to_latex' plugins/redmine_doc_pu/lib/latex_doc.rb:65:inblock in to_latex' plugins/redmine_doc_pu/lib/latex_doc.rb:64:in to_latex' plugins/redmine_doc_pu/lib/latex_doc.rb:115:inbuild' plugins/redmine_doc_pu/app/models/doc_pu_document.rb:27:in build' plugins/redmine_doc_pu/app/controllers/doc_pu_controller.rb:101:inbuild_remote' lib/redmine/sudo_mode.rb:63:in `sudo_mode'

vvmruder commented 8 years ago

Sorry for this late reply. I'am not at this project mainly. I think, the cross page refs are not working at all at this moment. Sorry. Not a feature we need. Are you interested to fix this by yourself?

vvmruder commented 8 years ago

I can inform you by now: Your issue was fixed with commit be24978d0e49f7fe8dac8db939e6aa2eec87e7de.