Modify

Opened 14 years ago

Closed 12 years ago

#8728 closed defect (fixed)

links to messages via anchors dont work

Reported by: Markus Decke Owned by: Markus Decke
Priority: normal Component: DiscussionPlugin
Severity: trivial Keywords:
Cc: Trac Release: 0.11

Description

Links of Messages which appear in the Timeline used to jump right to the message. Somehow the anchors are not used in the links anymore.

using the newest discussion plugin zip r10108 the links are now like this

https://<server>/discussion/message/1988

they were more like this

https://<server>/discussion/topic/131#message1988

Same behavior at http://blackhex.no-ip.org/timeline

The old way was nicer for long Threads and for linkage in the wiki

Attachments (1)

timeline.py.diff (694 bytes) - added by Markus Decke 14 years ago.
fix of the links to discussionboard in the timeline

Download all attachments as: .zip

Change History (6)

comment:1 in reply to:  description Changed 14 years ago by Markus Decke

Status: newclosed

I solved the problem with the diff of timeline, the right-hand side are my changes made to the latest original, as it looks in the svn.

79c79
<                 ids = ('message', message['id'])
---
>                 ids = (('topic',message['topic']),'message', message['id'])
86d85
< 
89,92c88,92
<            url = context.href.discussion(*ids)
<            if len(ids) == 3:
<                url = '%s#%s' % (url, ids[2])
<            return url
---
>             url = context.href.discussion(*ids)
>             if len(ids) == 3:
>                 url = context.href.discussion(*ids[0])
>                 url = '%s#%s%s' % (url, ids[1],ids[2])
>             return url
94c94
<            return tag(title)
---
>             return tag(title)
96c96
<            return tag(description)
---
>             return tag(description)

The last lines are not really changes, they just got moved to a different line. The problem was that the ids list never had 3 item, and therefor links were broken.

I used the zip provided at the discussionplugin wiki page.

I hope you can add that to the svn.

thx for the great plugin :)

Changed 14 years ago by Markus Decke

Attachment: timeline.py.diff added

fix of the links to discussionboard in the timeline

comment:3 Changed 14 years ago by Radek Bartoň

Severity: normaltrivial

Thank you for the patch, I'll fix that in the trunk when I'll get back to the plugin develompment.

comment:4 Changed 12 years ago by Ryan J Ollos

Status: reopenednew

#8448 was closed as a duplicate.

comment:5 Changed 12 years ago by Markus Decke

Owner: changed from Radek Bartoň to Markus Decke
Status: newassigned

comment:6 Changed 12 years ago by Markus Decke

Resolution: fixed
Status: assignedclosed

fixed with r12564 as in posted diff

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Markus Decke.
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.