canonical_url() needs to return browser URLs when generating XHTML representations

Bug #376990 reported by Björn Tillenius
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Björn Tillenius

Bug Description

When we generate XHTML of objects in the web service, canonical_url() returns URLs suitable for the web service, not for the browser. We need a way to make canonical_url() return browser URLs here.

Related branches

Revision history for this message
Björn Tillenius (bjornt) wrote :

I'm marking this as High, since it's blocking the commenting-inline work.

Changed in launchpad-foundations:
assignee: nobody → Björn Tillenius (bjornt)
status: New → In Progress
importance: Undecided → High
milestone: none → 2.2.6
Revision history for this message
Björn Tillenius (bjornt) wrote :

I'm unassigning myself for now, since it wasn't as straightforward as I thought. I got stuck on trying to write a test for this.

Changed in launchpad-foundations:
assignee: Björn Tillenius (bjornt) → nobody
status: In Progress → Triaged
Revision history for this message
Björn Tillenius (bjornt) wrote :

Leonard, could you take a look at this? It's blocking the commenting inline work.

Changed in launchpad-foundations:
assignee: nobody → Leonard Richardson (leonardr)
Revision history for this message
Björn Tillenius (bjornt) wrote :

BTW, the main issue I ran into was that it's not clear how to get the real host name. Sometimes the root for the web service is api.foo/beta, and sometimes foo/api/beta. I don't know whether it's safe to first assume it's api.foo/$version, and if not, assume it's foo/api/$version.

Changed in launchpad-foundations:
milestone: 2.2.6 → 2.2.7
Changed in launchpad-foundations:
assignee: Leonard Richardson (leonardr) → nobody
milestone: 2.2.7 → none
tags: added: api
Changed in launchpad-foundations:
assignee: nobody → Björn Tillenius (bjornt)
milestone: none → 2.2.8
status: Triaged → In Progress
Revision history for this message
Björn Tillenius (bjornt) wrote : Re: canonical_url() need to return browser URLs when generating XHTML representations

An adapter isn't needed. I've updated the description, so that it describes the real issue.

summary: - Adapt a web service request to a browser request
+ canonical_url() need to return browser URLs when generating XHTML
+ representations
description: updated
summary: - canonical_url() need to return browser URLs when generating XHTML
+ canonical_url() needs to return browser URLs when generating XHTML
representations
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit

Fixed in devel r8997.

Changed in launchpad-foundations:
status: In Progress → Fix Committed
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.