Actions
Defect #5939
closedAtom entry URL doesn't contain port
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Feeds
Target version:
-
Start date:
2010-07-22
Due date:
% Done:
0%
Estimated time:
Resolution:
Cant reproduce
Affected version:
Description
Host name in settings set to <ip-address>:3000, but all ATOM entries has URLs without ports.
It works if I change code as follows:
Index: app/views/common/feed.atom.rxml
===================================================================
--- app/views/common/feed.atom.rxml (revision 3810)
+++ app/views/common/feed.atom.rxml (working copy)
@@ -1,4 +1,7 @@
xml.instruct!
+
+server_port = 3000
+
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
xml.title truncate_single_line(@title, :length => 100)
xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false))
@@ -9,7 +12,7 @@
xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
@items.each do |item|
xml.entry do
- url = url_for(item.event_url(:only_path => false))
+ url = url_for(item.event_url(:only_path => false, :port => server_port))
if @project
xml.title truncate_single_line(item.event_title, :length => 100)
else
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
Rails 2.3.5
Redmine 0.9.4.stable.3810 (SQLite)
Updated by Felix Schäfer over 14 years ago
- Status changed from New to Closed
- Resolution set to Invalid
The host name setting is only used for the links in mails. The ATOM feed links are generated like every other link in redmine from the URL you are accessing it. The proposed patch also hard-codes the port, which is not desired behavior.
Updated by Kirill Vasiliev over 14 years ago
- Status changed from Closed to Reopened
It wasn't proposed patch, it was merely workaround demonstration. I'm sorry if I confuse you.
Some steps to reproduce:
- Install and run redmine on port 3000
- Create new project
- Go to the News tab
- Create new news article
- Hover on Atom link. The IP address will be http://<address>:3000/projects/<project>/news.atom?key=<key>
- Click an Atom link and view the source of the feed generated. There will be entry like this:
<entry> <title>title</title> <link href="http://<address>/news/2" rel="alternate"/> <id>http://<address>/news/1</id> <updated>2010-03-31T13:00:34+04:00</updated> <author> <name>name</name> <email>mail</email> </author> <content type="html"> content </content> </entry>
Note the URLs inside href attribute and id element doesn't contain port.
Updated by Jean-Philippe Lang over 14 years ago
- Category set to Feeds
- Status changed from Reopened to Closed
- Resolution changed from Invalid to Cant reproduce
Here is what I get with latest trunk. You can see the port number in URLs:
<entry> <title>foo - Feature #4481 (New): Issue A1</title> <link href="http://192.168.199.129:3001/issues/4481" rel="alternate"/> <id>http://192.168.199.129:3001/issues/4481</id> <updated>2010-03-27T17:45:00+01:00</updated> <author> <name>Jean-Philippe Lang</name> <email>jp@somenet.foo</email> </author> <content type="html"> </content> </entry>
Actions