Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4287 closed defect (fixed)

Timeline RSS feed produces broken links

Reported by: tjb@… Owned by: Matthew Good
Priority: highest Milestone: 0.11
Component: timeline Version: devel
Severity: major Keywords: rss
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When trying to view the links provided by the timeline RSS feed, the fully qualified hostname is being truncated.

Our URLS normally look like

    http://fred.cea.com.au/trac/ProjectName/...

but the links provided by the RSS feed are coming out as

    http://fred.cea.com/trac/ProjectName/...

This has broken sometime in the last few weeks, not sure when.
We are running from the latest trunk available.

Attachments (0)

Change History (12)

comment:1 by Christian Boos, 18 years ago

Resolution: worksforme
Status: newclosed

Check you trac.ini file, you most probably have this setting:

[trac]
base_url = http://fred.cea.com

which should be changed to:

[trac]
base_url = http://fred.cea.com.au

comment:2 by tjb@…, 18 years ago

No, my base_url looks like this

[trac]
  base_url = http://fred.cea.com.au/trac/

If I remove the trailing / (giving base_url = http://fred.cea.com.au/trac), I get links from the RSS feed which look like http://fred.cea.co/trac/ProjectName/

If it works for you, do you have a 4 part url? Looking into the code, the timeline rss feed is produced by a genshi template. My Genshi is 0.3.4, I'll look for an update…

comment:3 by tjb@…, 18 years ago

I updated to Genshi 0.3.5, and the current trac head - r4391.

Still the same problem. Looking at the Genshi template, there is a for loop (for event in events), and a method called on event (event.abs_href(req)), which causes my problem. Earlier use of abs_href (eg, abs_href.timeline()) produce the correct output, but of course, it is a different method.

I don't have the time to devote to learning Genshi and finding the problem, so I am still stuck :-(

comment:4 by Christian Boos, 18 years ago

Milestone: 0.11
Priority: normalhigh
Resolution: worksforme
Status: closedreopened

Sorry, yes this appears to be a real issue.

comment:5 by Christian Boos, 18 years ago

Keywords: rss added
Priority: highhighest
Severity: normalmajor

Thomas Moschny reminded us about this issue; the sooner it gets fixed, the better :)

comment:6 by Matthew Good, 18 years ago

Owner: changed from Jonas Borgström to Matthew Good
Status: reopenednew

The abs_href truncation seems to be incorrect: req.abs_href.base[:-len(req.href.base)]

I'll work on a fix.

comment:7 by Matthew Good, 18 years ago

Ah, there actually is a config problem here, though I may make a change to the code so it doesn't rely on the req.href.base value.

The base_url setting should be the absolute URL to the base of that project. So, it should be set to:

base_url = http://fred.cea.com.au/trac/ProjectName

comment:8 by thomas.moschny@…, 18 years ago

For my site, all urls in the generated RSS feed (and, fwiw, in the notification mails) are relative. Not sure whether this is exact the same problem, but at least strongly related.

Unlike the original submitter's setup, there are no projects, and there is no /trac/ element in the url; so all trac urls are 'top-level'.

I tried both, setting base_url to "http://trac.domain.tld/" and to "http://trac.domain.tld" (i.e. with and without trailing slash), but without success.

comment:9 by thomas.moschny@…, 18 years ago

Using r4585, the problem seems (at least for me, can't speak for the original submitter) mostly solved. The values of the rss/channel/item/link elements are correct now.

What is still wrong (relative) is the value of the rss/channel/image/url element.

comment:10 by tjb@…, 18 years ago

I tested my original problem against a recent trunk release (r4688), and the URL's now seem correct. I also upgraded to Genshi 0.3.6, as required. From my point of view, this could be closed now…

I have noted the config problem, not sure if it applies to us, but I will check.
I apologise for going so long without any input, I have been overseas on leave since late December, and only just returned.

Thanks to all involved.

in reply to:  9 comment:11 by Christian Boos, 18 years ago

Replying to thomas.moschny@gmx.de :

Using r4585, … What is still wrong (relative) is the value of the rss/channel/image/url element.

So this seems to be the last thing to be checked.

comment:12 by Matthew Good, 18 years ago

Resolution: fixed
Status: newclosed

The main issue was fixed in r4585 and the image URL has been fixed in r4983.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matthew Good.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Matthew Good 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.