Defect #694

Redmine 1.1.2 changes wiki controller "index" api

Added by Ted Lilley about 1 year ago. Updated about 1 year ago.

Status:新規(New) Start date:03/18/2011
Priority:通常(Normal) Due date:
Assignee:Haru Iida % Done:

0%

Category:- Spent time: -
Target version:-

Description

Wiki extensions' tab function breaks in the latest Redmine 1.1.2. The redirect_to call when clicking a tab still calls the "index" action in the wiki controller, but examining the wiki controller source reveals an apparent substitution of the function "index" for a new "show" action. It looks like the rest of the code within the wiki controller has been updated to call "show" wherever it used to call "index". I'm trying to patch my 0.2.4 wiki_extensions to do the same and see if this fixes the tabs.


Issue Extensions

History

#1 Updated by Ted Lilley about 1 year ago

The function in wiki_extensions is in wiki_extensions_controller.rb under the function forward_wiki_page, line 55.

#2 Updated by Ted Lilley about 1 year ago

That didn't work. Not sure what to try next.

#3 Updated by Haru Iida about 1 year ago

#4 Updated by Ted Lilley about 1 year ago

Fixed it for the tabs. Looks like this applies to all the redirect calls in wiki extensions. Here's the sample fix:

 1diff --git a/app/controllers/wiki_extensions_controller.rb b/app/controllers/wiki_extensions_controller.rb
 2--- a/app/controllers/wiki_extensions_controller.rb
 3+++ b/app/controllers/wiki_extensions_controller.rb
 4@@ -47,17 +47,17 @@ class WikiExtensionsController < Applica
 5   def tag
 6     tag_id = params[:tag_id].to_i
 7     @tag = WikiExtensionsTag.find(tag_id)
 8   end
 9
10   def forward_wiki_page
11     menu_id = params[:menu_id].to_i
12     menu = WikiExtensionsMenu.find_or_create(@project.id, menu_id)
13-    redirect_to :controller => 'wiki', :action => 'index', :id => @project, :page => menu.page_name
14+    redirect_to :controller => 'wiki', :action => 'show', :project_id => @project, :id => menu.page_name
15   end
16
17   def destroy_comment
18     comment_id = params[:comment_id].to_i
19     comment = WikiExtensionsComment.find(comment_id)
20     unless User.current.admin or User.current.id == comment.user.id
21       render_403 
22       return false

#5 Updated by Haru Iida about 1 year ago

  • Project changed from r-labs to Wiki Extensions

#6 Updated by Haru Iida about 1 year ago

  • Assignee set to Haru Iida

#7 Updated by Ted Lilley about 1 year ago

Haru Iida は書きました:

0.2.4 is too old.
Use 0.3.2.

http://www.redmine.org/plugins/wikiextensions

Thanks for the pointer. If you use google to try to find the latest, you end up at the google code repository which left off at 0.2.4. This is because a google search for "redmine wiki extensions" leads you to the original plugin page, not the new plugin directory one. From there you can't tell that the repository has been moved to bitbucket.

An update to the original text of the forum post at: http://www.redmine.org/boards/3/topics/7130 would prevent this.

Also available in: Atom PDF