Edgewall Software
Modify

Opened 18 years ago

Closed 17 years ago

#2432 closed defect (fixed)

Wiki timeline URLs should contain the version

Reported by: sudonym@… Owned by: Christian Boos
Priority: high Milestone: 0.11
Component: timeline Version: 0.9
Severity: major Keywords: rss
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Christopher Lenz)

URLs constructed on the timeline page and rss version for changes to Wiki pages only contain links to the Wiki page that was changed, not to the actual version of the Wiki page. This leads to non-unique URLs in the rss feeds which break many readers, as well as having links on the timeline to non specific Wiki page versions. This patch corrects this issue:

  • trac/wiki/web_ui.py

    old new  
    129129            format = req.args.get('format')
    130130            db = self.env.get_db_cnx()
    131131            cursor = db.cursor()
    132             cursor.execute("SELECT time,name,comment,author "
     132            cursor.execute("SELECT time,name,comment,author,version "
    133133                           "FROM wiki WHERE time>=%s AND time<=%s",
    134134                           (start, stop))
    135             for t,name,comment,author in cursor:
     135            for t,name,comment,author,version in cursor:
    136136                title = '<em>%s</em> edited by %s' % (
    137137                        escape(name), escape(author))
    138138                if format == 'rss':
    139                     href = self.env.abs_href.wiki(name)
     139                    href = escape(self.env.abs_href.wiki(name,version=version))
    140140                    comment = wiki_to_html(comment or '--', self.env, db,
    141141                                           absurls=True)
    142142                else:
    143                     href = self.env.href.wiki(name)
     143                    href = escape(self.env.href.wiki(name,version=version))
    144144                    comment = wiki_to_oneliner(comment, self.env, db,
    145145                                               shorten=True)
    146146                yield 'wiki', href, title, t, author, comment

Attachments (1)

web_ui.py.patch (1.4 KB ) - added by anonymous 18 years ago.

Download all attachments as: .zip

Change History (7)

by anonymous, 18 years ago

Attachment: web_ui.py.patch added

comment:1 by Christopher Lenz, 18 years ago

Description: modified (diff)

(fixed description)

comment:2 by anonymous, 18 years ago

Thanks for cleaning up the description. There doesn't appear to be an attach file link on the new ticket page so I didn't see the link till after the initial submission.

comment:3 by Christian Boos, 18 years ago

Keywords: rss added
Resolution: duplicate
Status: newclosed

Dupe of #239, though the note about RSS readers requiring different URLs is interesting.

comment:4 by Christopher Lenz, 18 years ago

Resolution: duplicate
Status: closedreopened

I do not agree that this is a duplicate.

comment:5 by Christian Boos, 17 years ago

Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos
Status: reopenednew

Right, was not the same thing as #239.

But from the TracTimeline, if one goes to a specific version, it should also be possible to quickly jump to the latest version, as well as eventually navigate between versions.

comment:6 by Christian Boos, 17 years ago

Resolution: fixed
Status: newclosed

Implemented in r4365, together with restoring the version banner (version info + comment) when viewing a specific version.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.