Ticket #8728 (closed defect: fixed)

Opened 2 years ago

Last modified 4 months ago

links to messages via anchors dont work

Reported by: markus.decke@phoetry.de Assigned to: mbdecke
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

timeline.py.diff (0.7 kB) - added by markus.decke@phoetry.de on 05/18/11 19:43:55.
fix of the links to discussionboard in the timeline

Change History

(in reply to: ↑ description ) 05/18/11 19:42:51 changed by markus.decke@phoetry.de

  • status changed from new to closed.

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 :)

05/18/11 19:43:55 changed by markus.decke@phoetry.de

  • attachment timeline.py.diff added.

fix of the links to discussionboard in the timeline

05/20/11 10:38:01 changed by Blackhex

  • severity changed from normal to trivial.

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

10/10/12 21:39:22 changed by rjollos

  • status changed from reopened to new.

#8448 was closed as a duplicate.

01/23/13 21:51:51 changed by mbdecke

  • owner changed from Blackhex to mbdecke.
  • status changed from new to assigned.

01/23/13 22:10:36 changed by mbdecke

  • status changed from assigned to closed.
  • resolution set to fixed.

fixed with r12564 as in posted diff


Add/Change #8728 (links to messages via anchors dont work)




Change Properties
Action