Patch #6778

Wiki compatibility link broken w/o project_id

Added by W Snyder over 6 years ago. Updated over 5 years ago.

Status:NewStart date:2010-10-30
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Wiki
Target version:Candidate for next minor release

Description

Recent versions changed from using :id to :project_id for routing.
One replacement was missed in a compatibility link; this breaks old links to the wiki pages. This patch to routes fixes it: Thanks.

routes.rb:

- map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki'
+ map.connect 'wiki/:project_id/:page', :page => nil, :controller => 'wiki', :action => 'show'
+ map.connect 'wiki/:project_id/:page/:action', :page => nil, :controller => 'wiki'

History

#1 Updated by Felix Schäfer over 6 years ago

  • Assignee set to Eric Davis

#2 Updated by Eric Davis over 6 years ago

  • Assignee deleted (Eric Davis)

I am stepping down from working on Redmine. If someone else is interesting in working on this issue, feel free to reassign it to them.

Eric Davis

#3 Updated by Etienne Charlier almost 6 years ago

Hello,
We upgraded your forge fro 0.8.5 to 1.1.3 and the externals links to wiki pages where broken.

The patch above seem to fix the issue.

Please apply this path !!

Kind regards,
Etienne

#4 Updated by Etienne Massip almost 6 years ago

  • Target version set to Candidate for next minor release

#5 Updated by roman JProof over 5 years ago

Thanx for this Snippet

there is really an broken route.

routes.rb:

for copy paste
ca. line 237

  1. broken route disabled
  2. map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki'
  3. enables the correct route
    map.connect 'wiki/:project_id/:page', :page => nil, :controller => 'wiki', :action => 'show'
    map.connect 'wiki/:project_id/:page/:action', :page => nil, :controller => 'wiki'

Your post had helped

#6 Updated by roman JProof over 5 years ago

command back after an short-smile session script above was not usable and doesn't do what i tgought.

Short Problem:(i am only an ruby/redmine user)

to create an wiki-page it is not the problem.
To edit it doesn't work, because there isn't the right routing entry inside the route.rb.

to compare line above

map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards'

i had changed the wiki line to

map.connect 'projects/:project_id/wiki/:page/:action', :page => nil, :controller => 'wiki'

it solves the problem

Also available in: Atom PDF