Project

General

Profile

Cannot export issues to PDF (Redmine 2.6.5)

Added by Paul Graham over 8 years ago

HI

I am hoping someone can help.

When I chose to export an issue to PDF from redmine 2.6.5 I get an internal error page.

From the log I get the following info

Encoding::ConverterNotFoundError (code converter not found (UTF-8 to translation missing: en.general_pdf_encoding)):
lib/redmine/codeset_util.rb:133:in `encode'
lib/redmine/codeset_util.rb:133:in `from_utf8'
app/controllers/issues_controller.rb:133:in `block (2 levels) in show'
app/controllers/issues_controller.rb:125:in `show'

This is proceeded by the following for the issue I tried to export

Redirected to https://controlsproducts.no.enterdir.com/support/issues/2222
Completed 302 Found in 24.5ms (ActiveRecord: 2.2ms)
Started GET "/support/issues/2222" for 144.181.129.29 at 2015-10-13 13:31:24 +0100
Processing by IssuesController#show as HTML
Parameters: {"id"=>"2222"}
Current user: 131526 (id=3)
Rendered issues/_action_menu.html.erb (10.0ms)
Rendered plugins/advanced_roadmap_v2/app/views/hooks/issues/_show.html.erb (4.4ms)
Rendered plugins/redmine_lightbox2/app/views/attachments/_links.html.erb (7.5ms)
Rendered plugins/redmine_checklists/app/views/issues/_checklist.html.erb (13.5ms)
Rendered issue_relations/_form.html.erb (3.2ms)
Rendered issues/_relations.html.erb (20.4ms)
Rendered issues/_history.html.erb (52.2ms)
Rendered issues/_action_menu.html.erb (3.6ms)
Rendered issues/_form_custom_fields.html.erb (9.9ms)
Rendered issues/_attributes.html.erb (237.5ms)
Rendered plugins/redmine_agile/app/views/issues/_issue_color_form.html.erb (1.2ms)
Rendered plugins/redmine_checklists/app/views/issues/_checklist_fields.html.erb (2.6ms)
Rendered plugins/redmine_checklists/app/views/issues/_checklist_fields.html.erb (2.3ms)
Rendered plugins/redmine_checklists/app/views/issues/_checklist_form.html.erb (29.7ms)
Rendered issues/_form.html.erb (309.3ms)
Rendered plugins/redmine_mentions/app/views/hooks/redmine_mentions/_edit_mentionable.html.erb (14.9ms)
Rendered attachments/_form.html.erb (3.3ms)
Rendered issues/_edit.html.erb (361.7ms)
Rendered plugins/redmine_agile/app/views/agile_boards/_issues_sidebar.html.erb (0.7ms)
Rendered plugins/redmine_agile/app/views/agile_charts/_agile_charts.html.erb (0.9ms)
Rendered plugins/redmine_planning/app/views/hooks/_rmp_add_links.html.erb (0.6ms)
Rendered plugins/advanced_roadmap_v2/app/views/hooks/_milestones.html.erb (15.5ms)
Rendered plugins/redmine_tweaks/app/views/issues/_global_sidebar.html.erb (0.5ms)
Rendered issues/_sidebar.html.erb (55.1ms)
Rendered watchers/_watchers.html.erb (8.8ms)
Rendered issues/show.html.erb within layouts/base (795.0ms)
Rendered plugins/advanced_roadmap_v2/app/views/hooks/_stylesheet.html.erb (0.3ms)
Rendered inline template (0.8ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_headers.html.erb (1.1ms)
Rendered plugins/redmine_planning/app/views/hooks/_planning_scripts.html.erb (0.4ms)
Rendered plugins/progressive_projects_list/app/views/application/_progressive_sidebar.html.erb (0.0ms)
Rendered plugins/progressive_projects_list/app/views/application/_progressive_recent_projects.html.erb (2.6ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_add_form.html.erb (2.2ms)
Completed 200 OK in 1516.0ms (Views: 926.1ms | ActiveRecord: 64.1ms)
Started GET "/support/people/avatar?id=368&size=14" for 144.181.129.29 at 2015-10-13 13:31:26 +0100
Started GET "/support/people/avatar?id=368&size=24" for 144.181.129.29 at 2015-10-13 13:31:26 +0100
Started GET "/support/people/avatar?id=368&size=50" for 144.181.129.29 at 2015-10-13 13:31:26 +0100
Processing by PeopleController#avatar as HTML
Parameters: {"id"=>"368", "size"=>"24"}
Processing by PeopleController#avatar as HTML
Parameters: {"id"=>"368", "size"=>"14"}
Current user: 131526 (id=3)
Current user: 131526 (id=3)
Completed 304 Not Modified in 35.2ms (ActiveRecord: 0.5ms)
Completed 304 Not Modified in 64.2ms (ActiveRecord: 3.7ms)
Processing by PeopleController#avatar as HTML
Parameters: {"id"=>"368", "size"=>"50"}
Current user: 131526 (id=3)
Completed 304 Not Modified in 58.0ms (ActiveRecord: 3.9ms)
Started GET "/support/people/avatar?id=368&size=100" for 144.181.129.29 at 2015-10-13 13:31:26 +0100
Started GET "/support/people/avatar?id=368&size=28" for 144.181.129.29 at 2015-10-13 13:31:26 +0100
Started GET "/support/people/avatar?id=368&size=48" for 144.181.129.29 at 2015-10-13 13:31:26 +0100
Processing by PeopleController#avatar as HTML
Parameters: {"id"=>"368", "size"=>"28"}
Processing by PeopleController#avatar as HTML
Parameters: {"id"=>"368", "size"=>"48"}
Processing by PeopleController#avatar as HTML
Parameters: {"id"=>"368", "size"=>"100"}
Current user: 131526 (id=3)
Current user: 131526 (id=3)
Completed 304 Not Modified in 6.2ms (ActiveRecord: 0.8ms)
Current user: 131526 (id=3)
Completed 304 Not Modified in 7.0ms (ActiveRecord: 0.7ms)
Completed 304 Not Modified in 7.8ms (ActiveRecord: 0.8ms)
Started GET "/support/issues/2222.pdf" for 144.181.129.29 at 2015-10-13 13:31:28 +0100
Processing by IssuesController#show as PDF
Parameters: {"id"=>"2222"}
Current user: 131526 (id=3)
Completed 500 Internal Server Error in 345.7ms

My system info is as below

Environment:
Redmine version 2.6.5.stable.14393
Ruby version 2.0.0-p481 (2014-05-08) [x86_64-linux]
Rails version 3.2.22
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.8
Git 1.9.1
Filesystem
Redmine plugins:
advanced_roadmap_v2 2.4.1
clipboard_image_paste 1.10
planner 0.4
progressive_projects_list 2.0.1
redmine_agile 1.3.4
redmine_charts2 0.2.1
redmine_checklists 3.0.1
redmine_default_columns 0.1.1
redmine_dmsf 1.5.1 stable
redmine_knowledgebase 3.0.7
redmine_lightbox2 0.1.3
redmine_mentions 0.0.1
redmine_monitoring_controlling 0.1.1
redmine_people 0.1.8
redmine_per_project_formatting 0.0.4
redmine_pipeline_plugin 2.0.0
redmine_planning 0.7.6
redmine_stats 0.0.2
redmine_tweaks 0.4.6
redmine_work_time 0.3.0
redmine_workflow_hidden_fields 0.1.3
redmine_xlsx_format_issue_exporter 0.1.2
redrisk 1.0.1

I am running Ubuntu 14.04 Server 64 bit LTS

Does anyone know what the issue may be?

I cant find any errant plugins that may be causing an issue and everything else is stable. I cannot export issues list either


Replies (2)

RE: Cannot export issues to PDF (Redmine 2.6.5) - Added by Santi Oliveras almost 8 years ago

Hi Paul,
I have the same issue after installing redmine_workflow_hidden_fields 0.1.3 plugin.

regs,
Santi

RE: Cannot export issues to PDF (Redmine 2.6.5) - Added by Santi Oliveras almost 8 years ago

Hi Paul,
I've identified the possible changes about redmine_workflow_hidden_fields in the file lib/pdf.rb

And then I've compared with the 2.6.1 redmine trunk version. I've applied these changes into the pdf.rb from the trunk and replaced this file into lib/pdf.rb in the plugin.

then reinstalled the plugin with the modified lib/pdf.rb
And I can export the PDF, and the hidden issues doesn't appear in the PDF ;-)

I've attached my modified lib/pdf.rb file.
So, If you replace it in the plugin and reinstall it, then the PDF is generated without the hidden fields.

I'm not completely sure if this does the hole functionality... but it could solve your requirement.

regs,
Santi

pdf.rb (25.6 KB) pdf.rb Modified pdf.rb from redmine 2.6.1 trunk version.
    (1-2/2)