Modify

Opened 13 years ago

Last modified 12 years ago

#8790 new defect

wrong url in sitemap for tickets: prefix duplicate

Reported by: Boris Savelev Owned by: Martin Scharrer
Priority: normal Component: GoogleSitemapPlugin
Severity: normal Keywords:
Cc: Myroslav Opyr Trac Release: 0.12

Description

my trac available on example.com/trac

for tickets plugin generate url: http://example.com/trac/trac/ticket/1

"trac" twice

here the patch.

--- tracgooglesitemap/plugin.py (revision 10162)
+++ tracgooglesitemap/plugin.py (working copy)
@@ -103,7 +103,7 @@
                   "SELECT id,changetime FROM ticket"
               )
               urls.append( [ tag.url(
-                              tag.loc( req.base_url + req.href.ticket(ticketid) ),
+                              tag.loc( self.env.abs_href.ticket(ticketid) ),
                               tag.lastmod( self._fixtime(format_datetime (changetime,'iso8601')) )
                         ) for n,[ticketid,changetime] in enumerate(cursor) ] )
 

Attachments (0)

Change History (3)

comment:1 Changed 13 years ago by Myroslav Opyr

Cc: Myroslav Opyr added; anonymous removed

This patch is part of #8485.

comment:2 Changed 12 years ago by Chris Nelson

(In [11414]) If a predecessor has children, they are also predecessors. Refs #9838.

Also fix a bug in finding roots. Refs #8790, #8574.

comment:3 in reply to:  2 Changed 12 years ago by Chris Nelson

Replying to ChrisNelson:

(In [11414]) If a predecessor has children, they are also predecessors. Refs #9838.

Also fix a bug in finding roots. Refs #8790, #8574.

Sorry. Those 8xxx ticket numbers are from my local system. I didn't clean them out before copying the change to my T-H branch.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Martin Scharrer.

Add Comment


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

 
Note: See TracTickets for help on using tickets.