Defect #694
open
Redmine 1.1.2 changes wiki controller "index" api
Added by Ted Lilley about 10 years ago.
Updated about 10 years ago.
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.
The function in wiki_extensions is in wiki_extensions_controller.rb under the function forward_wiki_page, line 55.
That didn't work. Not sure what to try next.
Fixed it for the tabs. Looks like this applies to all the redirect calls in wiki extensions. Here's the sample fix:
diff --git a/app/controllers/wiki_extensions_controller.rb b/app/controllers/wiki_extensions_controller.rb
--- a/app/controllers/wiki_extensions_controller.rb
+++ b/app/controllers/wiki_extensions_controller.rb
@@ -47,17 +47,17 @@ class WikiExtensionsController < Applica
def tag
tag_id = params[:tag_id].to_i
@tag = WikiExtensionsTag.find(tag_id)
end
def forward_wiki_page
menu_id = params[:menu_id].to_i
menu = WikiExtensionsMenu.find_or_create(@project.id, menu_id)
- redirect_to :controller => 'wiki', :action => 'index', :id => @project, :page => menu.page_name
+ redirect_to :controller => 'wiki', :action => 'show', :project_id => @project, :id => menu.page_name
end
def destroy_comment
comment_id = params[:comment_id].to_i
comment = WikiExtensionsComment.find(comment_id)
unless User.current.admin or User.current.id == comment.user.id
render_403
return false
- Project changed from r-labs to Wiki Extensions
- Assignee set to Haru Iida
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