hook to force page refresh on context url changing is not working

Bug #1004248 reported by Michael Hudson-Doyle
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Richard Harding

Bug Description

There is a hook in base-layout-macros.pt to force a page refresh if an ajax action causes the URL of a page to change:

            Y.on('lp:context:web_link:changed', function(e) {
                  window.location = e.new_value;
            });

This isn't working. You can reproduce this by editing the task of a bug or by editing the name of a recipe.

Related branches

William Grant (wgrant)
Changed in launchpad:
importance: Undecided → Critical
status: New → Triaged
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

FWIW, poking with firebug suggests that the cache isn't being updated by the edits (LP.cache.context.web_link is unchanged by edits that should change it)

William Grant (wgrant)
tags: added: javascript regression ui
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Some more poking suggests that rev 14634 broke this.

The code checks update events need to be fired for an object in the cache by comparing lp_original_uri of the entry object that is constructed out of the response from the PATCH with the self_link of the object in the cache. Rev 14634 changed things so that the entry is constructed with the _new_ URI as lp_original_uri and so it doesn't match anything in the cache.

Changed in launchpad:
assignee: nobody → Richard Harding (rharding)
status: Triaged → In Progress
summary: - hook to force page refresh on context url changing is not working
+ hook to force page refresh on context url changing is not workings
summary: - hook to force page refresh on context url changing is not workings
+ hook to force page refresh on context url changing is not working
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
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.