Modify

Opened 13 years ago

Last modified 13 years ago

#9302 new defect

interaction with TracSectionEdit causes Initialize errors

Reported by: jeffrey.guy.lyon@… Owned by: Martin Scharrer
Priority: normal Component: NumberedHeadlinesPlugin
Severity: normal Keywords: SectionEditPlugin, Initialize Error
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

SectionEditPlugin works fine for all these cases...

= A title =
Some text
# A Heading #
Some Text
## A Subheading ##
Some Text 

However, adding IDs to the headings causes problems. For example,

= A title =#id1
Some text
# A Heading #=id2
Some Text
## A Subheading ##=id3
Some Text 

When clicking on the "Edit" for id1, the whole page opens up for editing instead of just the first seciton. When clicking on "Edit" for either of the numbered headings, the Trac error is issued:

Initialize Error The section <N> that you chose could not be found.

where <N> is 2 or 3 depending on which heading is clicked.

Attachments (0)

Change History (7)

comment:1 Changed 13 years ago by Ryan J Ollos

I think the solution here might be for NumberedHeadlinesPlugin to use # for the anchor rather than =. I tend to think this could be done without interfering with the normal function of the NumberedHeadlinesPlugin.

That is, use:

## Numbered Headline ###ownID

rather than,

## Numbered Headline ##=ownID

You could test this out by a simple modification of the regular expression on line 57 of plugin.py:

r"(?P<nhanchor>=%s)?(?:\s|$))" % XML_NAME

->

r"(?P<nhanchor>#%s)?(?:\s|$))" % XML_NAME

comment:2 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 13 years ago by Ryan J Ollos

See also #5460. I think that fix wasn't correct. I'm planning to investigate further.

comment:4 Changed 13 years ago by Ryan J Ollos

Keywords: SectionEditPlugin added; TracSectionEdit removed

comment:5 in reply to:  3 Changed 13 years ago by Ryan J Ollos

Replying to rjollos:

See also #5460. I think that fix wasn't correct. I'm planning to investigate further.

This fix was correct for Trac 0.11, but not for 0.12.

comment:6 Changed 13 years ago by Ryan J Ollos

We need to check whether this issue still occurs following #7826, but if so I'd work on implementing a fix.

comment:7 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Martin Scharrer.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.