Modify

Opened 3 years ago

Last modified 2 years ago

#8790 new defect

wrong url in sitemap for tickets: prefix duplicate

Reported by: bsavelev Owned by: martin_s
Priority: normal Component: GoogleSitemapPlugin
Severity: normal Keywords:
Cc: myroslav 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 3 years ago by myroslav

  • Cc myroslav added

This patch is part of #8485.

comment:2 follow-up: Changed 2 years ago by ChrisNelson

(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 2 years ago by ChrisNelson

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.

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.