Project

General

Profile

Actions

Defect #25702

closed

Exporting wiki page with specific table to PDF causes 500

Added by Leon Blakey over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
PDF export
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

I am getting this exception when saving the attached wiki page to PDF.

Started GET "/projects/sandbox/wiki/User3.pdf" for 74.143.73.222 at 2017-04-26 12:00:05 +0000
Processing by WikiController#show as PDF
  Parameters: {"project_id"=>"sandbox", "id"=>"User3"}
  Current user: LBlakey (id=25)
  Rendered wiki/show.pdf.erb (2394.5ms)
Completed 500 Internal Server Error in 2447ms (ActiveRecord: 42.0ms)

ActionView::Template::Error (undefined method `[]' for nil:NilClass):
    1: <%= raw wiki_page_to_pdf(@page, @project) %>
  lib/redmine/export/pdf.rb:95:in `RDMwriteFormattedCell'
  lib/redmine/export/pdf/wiki_pdf_helper.rb:79:in `write_wiki_page'
  lib/redmine/export/pdf/wiki_pdf_helper.rb:55:in `wiki_page_to_pdf'
  app/views/wiki/show.pdf.erb:1:in `_app_views_wiki_show_pdf_erb___2725341082725750565_42106300'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Steps to reproduce

  1. Create a wiki page called User3
  2. Paste in the contents of the attached wiki_crash.txt file. Save
  3. Click the PDF link at the bottom of the page. Get 500 error and the above exception in the logs
  4. Edit the page and remove the last word "r" at the end of the table. Save
  5. Click the PDF link again. Page saves successfully

System Information

Uses the docker redmine:latest image

Environment:
  Redmine version                3.3.2.stable
  Ruby version                   2.2.6-p396 (2016-11-15) [x86_64-linux]
  Rails version                  4.2.7.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.10
  Mercurial                      3.1.2
  Bazaar                         2.7.0
  Git                            2.1.4
  Filesystem                     
Redmine plugins:
  no plugin installed

Files

wiki_crash.txt (5.28 KB) wiki_crash.txt Leon Blakey, 2017-04-26 14:49
1.png (45.7 KB) 1.png Toshi MARUYAMA, 2017-05-26 12:31
Actions

Also available in: Atom PDF