Modify

Opened 6 years ago

Closed 6 years ago

#8755 closed defect (fixed)

Using id="attachments" causes problems with other plugins

Reported by: N@ Owned by: Mark Ryan
Priority: normal Component: ChildTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

When I have ChildTicketsPlugin installed with then TracTicketChangesetsPlugin, the changesets generated by TracTicketChangesetsPlugin for the ticket appear twice.

This is because the ChildTicketsPlugin is using the "attachments" id for it's div tag. The TracTicketChangesetsPlugin is filtering the template stream looking for this ID so it knows when to insert it's section, sees "attachments" twice, and inserts it's section twice.

Obviously, TracTicketChangesetsPlugin needs to be fixed as well, but ChildTicketsPlugin should use something unique for it's section id, like "childtickets" (line 135 or [10110]):

  snippet = tag.div(id="childtickets")

You can get the same effect by using the "changelog" id (line 211 of [10110]):

  snippet.append(tag.div(tablediv, buttondiv, id="changelog"))

Mind you, this could end up having the same effect if someone filters the stream on "changelog"! So, maybe you could create your own id instead?

Ultimately, some of these styles that people are going to want to use should be moved from CSS ids to classes, but this is obviously out of your control. :)

I'm also going to put a bug against TracTicketChangesetsPlugin.

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by Bangyou Zheng

I have the same problem. See #8757

comment:2 Changed 6 years ago by Mark Ryan

Resolution: fixed
Status: newclosed

(In [10179]) Fixes #8755:

  • Release 2.4.2 (trac 0.12)
  • The border style of the childtickets has been temporarily lost (I'll get around to putting in a dedicated CSS style for childtickets soon) - but it still looks OK (I think.....)

Modify Ticket

Action
as closed The owner will remain Mark Ryan.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.