Defect #5445
closedExternal links not correctly displayed in Wiki TOC
100%
Description
{{toc}} h1. "Link1":http://www.redmine.org/ h2. "Link2":http://www.redmine.org/ h1. "Link3":http://www.redmine.org/
Files
Updated by Felix Schäfer over 14 years ago
- Subject changed from TOC does not display correctly headers linked to the external to External links not correctly displayed in Wiki TOC
- Target version set to 0.9.5
Not sure how complex the problem is, but I'd wager it's more a small-ish parser/filter issue that could be included in 0.9.5.
Updated by Eric Davis about 14 years ago
Can someone add some tests for these patches? The wiki syntax is a high risk area of code and I want to make sure these changes don't break anything.
Updated by Jean-Baptiste Barth about 14 years ago
- File 5445_git.diff 5445_git.diff added
Yuki version with pre/post strings detected in LINK_RE regex, and a unit test. Maybe this test should be moved into test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb ?
Updated by Eric Davis about 14 years ago
- Category changed from Wiki to Text formatting
- Status changed from New to Resolved
- Assignee set to Eric Davis
- % Done changed from 0 to 100
- Resolution set to Fixed
Fixed in r3786. Thank you for adding some tests for this bug, it will make it easier to prevent this from reoccurring later.
Updated by Eric Davis about 14 years ago
- Status changed from Resolved to Closed
Merged to 0.9-stable for release.
Updated by Roland Discein about 14 years ago
- Status changed from Closed to Reopened
r3786 has broken my installation:
Processing WelcomeController#index (for 192.168.192.168 at 2010-06-22 14:34:00) [GET] Parameters: {"action"=>"index", "controller"=>"welcome"} Rendering template within layouts/base Rendering welcome/index ActionView::TemplateError (undefined method `+' for nil:NilClass) on line #23 of app/views/welcome/index.rhtml: 20: <% for project in @projects %> 21: <li> 22: <%= link_to h(project.name), :controller => 'projects', :action => 'show', :id => project %> (<%= format_time(project.created_on) %>) 23: <%= textilizable project.short_description, :project => project %> 24: </li> 25: <% end %> 26: </ul> lib/redmine/wiki_formatting/textile/formatter.rb:70:in `textile_p_withtoc' lib/redmine/wiki_formatting/textile/formatter.rb:70:in `gsub!' lib/redmine/wiki_formatting/textile/formatter.rb:70:in `textile_p_withtoc' lib/redcloth3.rb:711:in `call' lib/redcloth3.rb:711:in `block_textile_prefix' lib/redcloth3.rb:659:in `call' lib/redcloth3.rb:659:in `blocks' lib/redcloth3.rb:658:in `each' lib/redcloth3.rb:658:in `blocks' lib/redcloth3.rb:633:in `collect' lib/redcloth3.rb:633:in `blocks' lib/redcloth3.rb:304:in `to_html' lib/redmine/wiki_formatting/textile/formatter.rb:38:in `to_html' lib/redmine/wiki_formatting.rb:54:in `to_html' app/helpers/application_helper.rb:421:in `textilizable' app/views/welcome/index.rhtml:23:in `_run_rhtml_app47views47welcome47index46rhtml' app/views/welcome/index.rhtml:20:in `each' app/views/welcome/index.rhtml:20:in `_run_rhtml_app47views47welcome47index46rhtml' Rendering /opt/redmine/public/500.html (500 Internal Server Error)
script/about:
Ruby version 1.8.7 (i486-linux) RubyGems version 1.3.7 Rack version 1.0 Rails version 2.3.5 Active Record version 2.3.5 Active Resource version 2.3.5 Action Mailer version 2.3.5 Active Support version 2.3.5 Application root /path/to/redmine Environment production Database adapter mysql Database schema version 20100313171051 About your Redmine plugins Redmine Whining plugin 0.0.3 Redmine Opensearch plugin 0.1 Thumbnails plugin 0.1.1 Redmine Status Updates 0.1.1 Redmine Request Tracker link 0.1.0 Redmine Graphs plugin 0.1.0 Issue Resources 0.2.0 Redmine Bugcloud plugin 0.0.2.1 ezFAQ plugin 0.3.5 Redmine Favicon plugin 0.1 Redmine link 0.1.0 Redmine Code Review plugin 0.3.1 Redmine Local Avatars plugin 0.0.2 Redmine Issues Group plugin 0.1.7 Redmine Todo Lists plugin 0.0.3.9 Redmine My Widgets plugin 0.1.0 Redmine ezSummary plugin 0.0.1 Redmine Charts 0.1.0 Redmine Question plugin 0.3.0
Maybe it die while textilizing the short description of one of the last projects in my installation:
h2. "Project Name !/attachments/1234/logo_small.gif! !/attachments/5678/logo_2.png!":/projects/projectname/issues | "New Issue here":mailto:emissionaddress@mycompany.com?body=Project:projectname | | "Create issue in Category A":mailto:emissionaddress@mycompany.com?body=Project:projectname%0ACategory:A |
What am I doing wrong?
Updated by Roland Discein about 14 years ago
Update:
formatter.rb.diff patch works fine, except it actually cant remove
!attachedimage!, version:smth, attachment:filelink tags from toc, only
"Link name":http://link.address.com, but commited r3786 patch brakes system at every place where it tries to textilize links. For example, MyController displays page, but ProjectsController falls in 500.html..
Updated by Yuki Kita about 14 years ago
- File formatter.rb.diff formatter.rb.diff added
Confirmed.
So I updated the patch.
Updated by Eric Davis about 14 years ago
- Status changed from Reopened to Closed
Roland Discein:
I've applied Yuki Kita's update and also a small change to remove the textile image links !/path/img.gif!
from the table of contents generator.