Defect #11133

Wiki-page section edit link can point to incorrect section

Added by Maarten Hoogveld over 5 years ago. Updated over 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Wiki
Target version:2.0.3
Resolution:Fixed Affected version:2.0.2

Description

When headers in a wiki page are preceded by a line with one space (instead of an empty line), the section edit links edit the wrong section of the section of the page.
This is present in versions 1.4.1 and 2.0.2 of Redmine.

With the example content, four h1. sections are created.
The links point to the correct url (e.g. link to edit chapter 3 point to ?section=3)
The content shown in the edit page however, does not correctly respond to the section.
Clicking the edit link for Chapter 2 will edit Chapter 2 and 3.
Editing Chapter 3 will edit Chapter 4.

Headers may have to be separated by empty lines, but if an accidental space is present on such a line, it is not at all clear to the user why section editing does not work correctly.

To reproduce:
  • Create an wiki page with the content provided in the attachment
    (Note the added space above the line 'h1. Chapter 3')
  • Save page
  • Click on the several section-edit icons

wikipage-content.txt Magnifier - Content of wiki page to reproduce this issue (125 Bytes) Maarten Hoogveld, 2012-06-11 12:56


Related issues

Duplicated by Redmine - Defect #11189: "Edit this section" sometimes does't work Closed

Associated revisions

Revision 9822
Added by Jean-Philippe Lang over 5 years ago

Fixed that lines with spaces only before headings break wiki section extraction (#11133).

History

#1 Updated by Jean-Philippe Lang over 5 years ago

  • Status changed from New to Confirmed
  • Target version set to 2.0.3

#2 Updated by Jean-Philippe Lang over 5 years ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed in r9822.

#3 Updated by Jean-Philippe Lang over 5 years ago

  • Status changed from Resolved to Closed

Merged in 1.4 and 2.0.

Also available in: Atom PDF