Edgewall Software

Opened 16 years ago

Closed 13 years ago

#305 closed defect (wontfix)

Rev 1025 genshi/path.py Events not being handle correctly. Causes pop from empty stack.

Reported by: benbennt Owned by: cmlenz
Priority: critical Milestone:
Component: General Version: devel
Keywords: needinfo Cc:

Description (last modified by cmlenz)

I have been trying to get agilo+trac+multi repo up and going. Clicking on Create New Ticket produces the error below. There is an issue that was introduced in revision 1025 . Anyways the system still should not attempt to pop from an empty stack. It is somehow related to the agilo code doing a replace on the <link rel="shortcut icon" /> It ends up sometimes not recording the beginning of link and pops two links off. You can check this by putting some sanity check in the stack to make sure the event being popped off it the same as the event that was put in.

File "/home/benjamin/python_workspace/genshi/genshi/path.py", line 129, in _test
  pos_queue = deque([(pos, cou, []) for pos, cou in stack[-1]])

stack =[] at this point. 
The file agilo/templates/theme.html
The specific code from agilo that seems to be causing it is the following. Going to create a new ticket.
    <py:match path="link[@rel='shortcut icon']" once="true">
	    <link rel="stylesheet"
	        href="${req.href.chrome('agilo/stylesheet/agilo_theme.css')}"
	        type="text/css" />
	    <link rel="stylesheet" type="text/css" media="print"
	        href="${req.href.chrome('agilo/stylesheet/print.css')}" />
			<?python
			ie_link = '''<!--[if lte IE 6]>
			<link rel="stylesheet" href="%s" type="text/css" media="screen" title="no title" charset="utf-8"/>
			<![endif]-->''' % req.href.chrome('agilo/stylesheet/ie_layout.css')
			?>
			${Markup(ie_link)}
	        ${select("*|text()")}
    </py:match>

<!--! Replace the link rel things before writing down the output of head again  -->
${select("*|text()")}

Change History (4)

comment:1 Changed 16 years ago by benbennett

I will look into fix if I get time this weekend. Can't spell my own name right.

comment:2 Changed 15 years ago by cboos

  • Keywords needinfo added; rev 1025 line 129 removed
  • Milestone 0.6 deleted

Is this still an issue? Was something fixed in Agilo?

Can you come up with a small test which reproduces the problem?

comment:3 Changed 15 years ago by cmlenz

  • Description modified (diff)

Fixed description

comment:4 Changed 13 years ago by hodgestar

  • Resolution set to wontfix
  • Status changed from new to closed

I can't rule out that this isn't a duplicate of #370 which was fixed in r1097 and then fixed some more in r1170. In the absence of further information and a suitable test case, I'm closing this (feel free to re-open if the problem persists and there is more information to add).

Note: See TracTickets for help on using tickets.