https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-05-05T09:17:47ZRedmineRedmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=164402010-05-05T09:17:47ZFelix Schäfer
<ul><li><strong>Subject</strong> changed from <i>TOC does not display correctly headers linked to the external</i> to <i>External links not correctly displayed in Wiki TOC</i></li><li><strong>Target version</strong> set to <i>0.9.5</i></li></ul><p>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 <a class="version" href="https://www.redmine.org/versions/19">0.9.5</a>.</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=169852010-05-25T13:52:32ZYuki Kita
<ul><li><strong>File</strong> <a href="/attachments/3840">formatter.rb.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3840/formatter.rb.diff">formatter.rb.diff</a> added</li></ul><p>Fixed</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=169882010-05-25T15:07:41ZMaksim Morozov
<ul><li><strong>File</strong> <a href="/attachments/3843">toclinks.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3843/toclinks.diff">toclinks.diff</a> added</li></ul><p>My variant</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=171112010-06-02T08:26:02Zyamasi yamasi
<ul></ul><p>あああ</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=171532010-06-05T04:11:50ZEric Davis
<ul></ul><p>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.</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=174862010-06-19T21:04:30ZJean-Baptiste Barth
<ul><li><strong>File</strong> <a href="/attachments/3991">5445_git.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3991/5445_git.diff">5445_git.diff</a> added</li></ul><p>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 ?</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=174912010-06-19T21:32:13ZEric Davis
<ul><li><strong>Category</strong> changed from <i>Wiki</i> to <i>Text formatting</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Eric Davis</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Fixed in <a class="changeset" title="Display the link name when external links are used in the toc macro. #5445 Contributed by Yuki K..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3786">r3786</a>. Thank you for adding some tests for this bug, it will make it easier to prevent this from reoccurring later.</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=175112010-06-19T22:58:47ZEric Davis
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul><p>Merged to 0.9-stable for release.</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=176122010-06-22T11:08:29ZRoland Discein
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p><a class="changeset" title="Display the link name when external links are used in the toc macro. #5445 Contributed by Yuki K..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3786">r3786</a> has broken my installation:</p>
<pre>
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)
</pre>
<p>script/about:</p>
<pre>
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
</pre>
<p>Maybe it die while textilizing the short description of one of the last projects in my installation:</p>
<pre>
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 |
</pre>
<p>What am I doing wrong?</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=176132010-06-22T12:23:19ZRoland Discein
<ul></ul><p>Update:<br /><a class="attachment" href="https://www.redmine.org/attachments/4018">formatter.rb.diff</a> patch works fine, except it actually cant remove <pre>!attachedimage!, version:smth, attachment:file</pre>link tags from toc, only <pre>"Link name":http://link.address.com</pre> , but commited <a class="changeset" title="Display the link name when external links are used in the toc macro. #5445 Contributed by Yuki K..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/3786">r3786</a> patch brakes system at every place where it tries to textilize links. For example, MyController displays page, but ProjectsController falls in 500.html..</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=176162010-06-22T13:59:37ZYuki Kita
<ul><li><strong>File</strong> <a href="/attachments/4018">formatter.rb.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4018/formatter.rb.diff">formatter.rb.diff</a> added</li></ul><p>Confirmed.<br />So I updated the patch.</p> Redmine - Defect #5445: External links not correctly displayed in Wiki TOChttps://www.redmine.org/issues/5445?journal_id=176512010-06-24T02:30:43ZEric Davis
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Closed</i></li></ul><p>Roland Discein:</p>
<p>I've applied Yuki Kita's update and also a small change to remove the textile image links <code>!/path/img.gif!</code> from the table of contents generator.</p>