I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Bug #2261

issues PDF view and descriptions

Added by Agustí Rivero about 11 years ago. Updated about 8 years ago.

Status:
Incomplete
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
04 Nov 2013
Due date:
% Done:

0%

Redmine version:
2.3.3
External issue:

Description

If you try to download a PDF view of issues and have also selecte to show description, an Internal server error occurs.

This doesn’t happen if extended_fields plugin is not installed.


Related issues

Related to Extended Fields - Bug #2359: Extended fields plugin breaks PDF export In Progress 29 Jan 2015
Related to Extended Fields - Bug #2318: Issues as pdf In Progress 25 Jun 2014
Related to Extended Fields - Bug #2098: Failure in XLS Export (undefined method `find_custom_field_template' for #<XlsExportController) In Progress 07 Sep 2012
Related to Extended Fields - Bug #1936: Undefined method `find_custom_field_template' Closed 06 Jan 2012 01 Feb 2012
Related to Extended Fields - Bug #1934: Export to csv fails, NoMethodError (undefined method `find_custom_field_template' Closed 06 Jan 2012

History

#1 Updated by rere rere almost 11 years ago

Hello,

I have the same issue. (redmine 2.3.2)

Thx

#2 Updated by Narayan Balakrishnan over 10 years ago

Same issue here. Is there a fix for this?

#3 Updated by Andriy Lesyuk over 10 years ago

  • Status changed from New to Open
  • Target version set to 0.2.3

#4 Updated by Andriy Lesyuk over 10 years ago

  • Status changed from Open to Incomplete
  • Assignee set to Andriy Lesyuk
  • Target version deleted (0.2.3)

I was able to reproduce the issue - in my case it was #12189. Please check!

Check also your production.log and paste the corresponding error here.

Thus, for me it was:

Errno::EACCES (Permission denied - /var/cache/redmine/default/pdf):
  lib/redmine/export/pdf.rb:42:in `initialize'
  lib/redmine/export/pdf.rb:529:in `new'
  lib/redmine/export/pdf.rb:529:in `issue_to_pdf'
  app/controllers/issues_controller.rb:129:in `block (2 levels) in show'
  app/controllers/issues_controller.rb:121:in `show

Fixed by changing permissions for /var/cache/redmine/default...

#5 Updated by Agustí Rivero over 10 years ago

This is my error log:

Started GET "/redmine/issues.pdf?c%5B%5D=project&c%5B%5D=status&c%5B%5D=subject&c%5B%5D=author&c%5B%5D=assigned_to&c%5B%5D=priority&c%5B%5D=updated_on&c%5B%5D=cf_15&c%5B%5D=relations&c%5B%5D=description&f%5B%5D=status_id&f%5B%5D=assigned_to_id&f%5B%5D=&group_by=&op%5Bassigned_to_id%5D=%3D&op%5Bstatus_id%5D=o&set_filter=1&utf8=%E2%9C%93&v%5Bassigned_to_id%5D%5B%5D=me" for 10.32.1.212 at 2014-05-02 13:32:07 +0200
Processing by IssuesController#index as PDF
  Parameters: {"c"=>["project", "status", "subject", "author", "assigned_to", "priority", "updated_on", "cf_15", "relations", "description"], "f"=>["status_id", "assigned_to_id", ""], "group_by"=>"", "op"=>{"assigned_to_id"=>"=", "status_id"=>"o"}, "set_filter"=>"1", "utf8"=>"✓", "v"=>{"assigned_to_id"=>["me"]}}
  Current user: agusti.rivero (id=3)
Completed 500 Internal Server Error in 149ms

*NoMethodError (undefined method `<' for nil:NilClass)*:
  lib/redmine/export/pdf.rb:305:in `block (2 levels) in calc_col_width'
  lib/redmine/export/pdf.rb:303:in `each'
  lib/redmine/export/pdf.rb:303:in `each_with_index'
  lib/redmine/export/pdf.rb:303:in `block in calc_col_width'
  app/helpers/issues_helper.rb:29:in `block in issue_list'
  app/helpers/issues_helper.rb:25:in `each'
  app/helpers/issues_helper.rb:25:in `issue_list'
  lib/redmine/export/pdf.rb:300:in `calc_col_width'
  lib/redmine/export/pdf.rb:428:in `issues_to_pdf'
  app/controllers/issues_controller.rb:89:in `block (2 levels) in index'
  app/controllers/issues_controller.rb:82:in `index'

#6 Updated by Andriy Lesyuk over 10 years ago

  • Status changed from Incomplete to Open
  • Target version set to 0.2.3

Agustí Rivero, thank you!

#7 Updated by Andriy Lesyuk over 10 years ago

Hm... Still not clear, what is the reason.

Agustí, could you please try commenting the following line in init.rb:

IssuesController.send(:include, ExtendedIssuesControllerPatch)

#8 Updated by Agustí Rivero over 10 years ago

This way it works!

Is it safe to leave it commented?

#9 Updated by Andriy Lesyuk over 10 years ago

Agustí Rivero wrote:

Is it safe to leave it commented?

Yes, it is.

#10 Updated by Andriy Lesyuk over 10 years ago

  • Status changed from Open to Incomplete

To be honest I can’t understand, what is causing the issue... You can still help with:

  • Telling what is cf_15 (the custom field with ID 15) – i.e., what type etc.
  • Trying to remove the cf_15 custom field from the list and exporting it into PDF.
  • Playing with list columns and other settings to see, what exactly is causing the issue.

Otherwise, I would need some one else, who gets the same issue, to help with figuring out these details...

#11 Updated by Andriy Lesyuk over 10 years ago

  • Target version deleted (0.2.3)

#12 Updated by Marc M over 10 years ago

You can close #2318, it is the same issue opened by me.

Redmine 2.5.1.stable.13182
Extended fields 0.2.3
Log:

Started GET "/issues/2012.pdf" for xx.xxx.xxx.xxx at 2014-06-25 14:43:36 +0200
Processing by IssuesController#show as PDF
  Parameters: {"id"=>"2012"}
  Current user: xx (id=3)

Completed 500 Internal Server Error in 140.6ms

NoMethodError (undefined method `find_custom_field_template' for #<IssuesController:0x007fc27cc2c978>):
  lib/redmine/export/pdf.rb:576:in `block in issue_to_pdf'
  lib/redmine/export/pdf.rb:575:in `each'
  lib/redmine/export/pdf.rb:575:in `each_with_index'
  lib/redmine/export/pdf.rb:575:in `issue_to_pdf'
  app/controllers/issues_controller.rb:133:in `block (2 levels) in show'
  app/controllers/issues_controller.rb:125:in `show'

#13 Updated by Andriy Lesyuk almost 10 years ago

  • Target version set to 0.2.4

#14 Updated by Andriy Lesyuk about 8 years ago

  • Duplicated by deleted (Bug #2318: Issues as pdf)

#15 Updated by Andriy Lesyuk about 8 years ago

  • Related to Bug #2359: Extended fields plugin breaks PDF export added

#16 Updated by Andriy Lesyuk about 8 years ago

#17 Updated by Andriy Lesyuk about 8 years ago

  • Related to Bug #2098: Failure in XLS Export (undefined method `find_custom_field_template' for #<XlsExportController) added

#18 Updated by Andriy Lesyuk about 8 years ago

  • Related to Bug #1936: Undefined method `find_custom_field_template' added

#19 Updated by Andriy Lesyuk about 8 years ago

  • Related to Bug #1934: Export to csv fails, NoMethodError (undefined method `find_custom_field_template' added

#20 Updated by Andriy Lesyuk about 8 years ago

This issue can get resolved after r124. Please check.

Also available in: Atom PDF

Terms of use | Privacy policy