Defect #14986

500 error when viewing a wiki page without WikiContent

Added by Rob D almost 9 years ago. Updated almost 9 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:


Target version:2.4.0
Resolution:Fixed Affected version:2.3.3


A 500 internal error occurs when viewing a particular wiki page, the following appears in the log:

Started GET "/redmine/projects/projName/wiki/SomeWikiPage" for <IP ADR> at Thu Sep 26 13:57:39 +1000 2013
Processing by WikiController#show as HTML
  Parameters: {"project_id"=>"projName", "id"=>"SomeWikiPage"}
  Current user: userName(id=3)
Completed 500 Internal Server Error in 19ms

NoMethodError (undefined method `current_version?' for nil:NilClass):
  app/controllers/wiki_controller.rb:96:in `show'

The error is 100% repeatable when viewing this particular page, although other wiki pages are rendered ok.
We believe it may have happened after deleting a revision on the wiki history page.
We tried to repeat it on the redmine demo site with no luck, although the demo site says it was running 2.3.1.devel.11915, we are using 2.3.3.stable.

Redmine version 2.3.3.stable
Ruby version 1.8.7-p253 (2010-04-19) [i686-linux]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
redmine_github_hook 0.2.0

Associated revisions

Revision 12220
Added by Jean-Philippe Lang almost 9 years ago

Fixed that viewing/editing a wiki page without WikiContent raises an error (#14986).


#1 Updated by Toshi MARUYAMA almost 9 years ago

  • Category set to Wiki

#2 Updated by Jean-Philippe Lang almost 9 years ago

  • Subject changed from Redmine 500 error when viewing a wiki page to 500 error when viewing a wiki page without WikiContent
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.4.0
  • Resolution set to Fixed

It looks like there's no WikiContent for this page. I have no clue on why this happened but the error is fixed in r12220 and you should now be able to edit this page.

Also available in: Atom PDF