Redmine 2.6.5 使用markdown进行编辑的时候,wiki连接bug

 

 

Redmind2.6.5中wiki存在bug

 

场景:

新建项目myproject,勾选wiki选项,此时点击wiki创建wiki

内容为: [test](test)

保存,这是点击这个test连接是正常的

但是当我点击导航栏的wiki(http://localhost:3000/projects/myproject/wiki),刷新当前页面后,再次点击test连接(http://localhost:3000/projects/myproject/xxxxf)

出错了

 

 

Page not found

The page you were trying to access doesn't exist or has been removed.

 

 

发现,此时test的连接中少了wiki

这是正常的wiki地址,http://localhost:3000/projects/fefwe/wiki/xxxxf

 

解决方案,修改源代码,在生成导航的wiki地址上加上wiki

http://localhost:3000/projects/myproject/wiki/wiki

 

修改文件:

/lib/redmine/menu_manager.rb

 

def render_menu(menu, project=nil)
        links = []
        menu_items_for(menu, project) do |node|
          links << render_menu_node(node, project)
        end
# 增加如下代码:
        if !links.empty?
          index = links.index{|x| x.include?("/wiki")}
          links[index].gsub!("/wiki", "/wiki/wiki") if index
        end
        links.empty? ? nil : content_tag('ul', links.join("\n").html_safe)
      end

 

更多精彩内容:

你可能感兴趣的:(redmine,wiki)