Defect #16255

Internal Error for specific version of non-existent wiki page

Added by Björn Peemöller almost 4 years ago. Updated almost 4 years ago.

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

0%

Category:Wiki
Target version:2.5.1
Resolution:Fixed Affected version:2.4.4

Description

Hi,

tonight the YandexBot visited our Redmine installation and queried for the first version of a non-existing wiki page (for whatever reaseon). The URL it requested looked like

https://redmine.server.de/projects/myproject/wiki/DoestNotExist?version=1

The same occurs for

https://redmine.server.de/projects/myproject/wiki/DoestNotExist/1

The exact error is

NoMethodError: undefined method `versions' for nil:NilClass
app/models/wiki_page.rb:107 content_for_version
app/controllers/wiki_controller.rb:69 show
...

Our environment is

Environment:
  Redmine version                2.4.4.stable
  Ruby version                   2.0.0-p353 (2013-11-22) [x86_64-linux]
  Rails version                  3.2.17
  Environment                    production
  Database adapter               PostgreSQL
SCM:
  Subversion                     1.6.17
  Mercurial                      2.2.2
  Git                            1.7.10.4
  Filesystem                     
Redmine plugins:
  redmine_wiki_extensions        0.6.4

Although this is not a big issue, I would like Redmine to return a 404 error instead.

Associated revisions

Revision 12971
Added by Jean-Philippe Lang almost 4 years ago

Fixed that requesting a specific version of a non-existent wiki page raises an error (#16255).

History

#1 Updated by Björn Peemöller almost 4 years ago

Today I could reproduce this bug with Redmine 2.5.0.

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

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.5.1
  • Resolution set to Fixed

Fixed in r12971, thanks for pointing this out.

#3 Updated by Jean-Philippe Lang almost 4 years ago

  • Status changed from Resolved to Closed

Merged.

Also available in: Atom PDF