brunoqs / pdf_export_redmine

Redmine plugin that exports all issues to a pdf
GNU General Public License v3.0
5 stars 4 forks source link

PDF fails resulting in 500 error every time. #5

Open Pashy83 opened 6 years ago

Pashy83 commented 6 years ago

Production log states this after 500 failure. I am attempting to only PDF 2 issues to test if it works.

Version Redmine 3.3.8 Stable

ActionView::Template::Error (undefined method full_width_layout?' for #<IssueCustomField:0x007f88bf95b330>): 1: <%= raw issues_to_pdf(@issues, @project, @query) %> plugins/pdf_export_redmine/lib/redmine_issues_pdf_helper_patch.rb:176:inblock (2 levels) in issues_to_pdf_with_full_pdf' plugins/pdf_export_redmine/lib/redmine_issues_pdf_helper_patch.rb:176:in reject' plugins/pdf_export_redmine/lib/redmine_issues_pdf_helper_patch.rb:176:inblock in issues_to_pdf_with_full_pdf' app/helpers/issues_helper.rb:30:in block in issue_list' app/helpers/issues_helper.rb:26:ineach' app/helpers/issues_helper.rb:26:in issue_list' plugins/pdf_export_redmine/lib/redmine_issues_pdf_helper_patch.rb:131:inissues_to_pdf_with_full_pdf' app/views/issues/index.pdf.erb:1:in _92d1426a9232d2de848174b0fd62fe17' plugins/advanced_roadmap/lib/advanced_roadmap/issues_controller_patch.rb:28:inrender' lib/redmine/sudo_mode.rb:63:in `sudo_mode'

brunoqs commented 6 years ago

@Pashy83 Sorry for leaving you waiting, this error occurs because I copied the source code to write to the pdf of the latest version of redmine, so some variables have different names. At the moment I'm not with the redmine environment installed, so I will not be able to resolve the issue now. Compare this code https://github.com/redmine/redmine/blob/3.3-stable/lib/redmine/export/pdf/issues_pdf_helper.rb with this https://github.com/brunoqs/pdf_export_redmine/blob/master/lib/redmine_issues_pdf_helper_patch.rb. Hope this helps!

jeortizquan commented 3 years ago

Hi here. I forked a version of this repo and this worked for me in redmine 3.1.1-1 https://github.com/jeortizquan/pdf_export_redmine/tree/feature/redmine-3.1.1-1 if someone needs it.