Modify

Opened 3 years ago

Closed 3 years ago

#8755 closed defect (fixed)

Using id="attachments" causes problems with other plugins

Reported by: natvincent Owned by: walnut
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 3 years ago by helend

I have the same problem. See #8757

comment:2 Changed 3 years ago by walnut

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

(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.....)

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from walnut. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.