Timeout edge redirect notice logic inverted

Bug #403863 reported by William Grant
50
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Undecided
Guilherme Salgado

Bug Description

The edge redirection notifications presented on timeouts are now being shown on lpnet, and not on edge. That's a bit useless.

devel r8529 has the below change. Now, my logic is a little rusty, but I think the disjuncts need to be inverted too.

=== modified file 'lib/canonical/launchpad/templates/launchpad-requestexpired.pt'
--- lib/canonical/launchpad/templates/launchpad-requestexpired.pt 2009-05-11 14:31:38 +0000
+++ lib/canonical/launchpad/templates/launchpad-requestexpired.pt 2009-05-27 22:29:02 +0000
@@ -25,7 +25,10 @@
       <script type="text/javascript">
         var edge_cookie = document.cookie.match('edge');
         var edge_host = document.location.hostname.match('edge');
- if (edge_cookie && edge_host) {
+
+ // Logic has been inverted in the next line to avoid breaking
+ // XHTML compliance of the template due to ampersand usage.
+ if (!(edge_cookie || edge_host)) {
           redirect_notice_div = document.getElementById('redirect_notice');
           redirect_notice_div.style.display = "block";
         };

Revision history for this message
Stuart P. Bentley (stuart) wrote :

Couldn't you just use a CDATA block (http://javascript.about.com/library/blxhtml.htm) to make it XHTML compliant without messing with the code?

Martin Pool (mbp)
Changed in launchpad-foundations:
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

Since the fix seems to be known couldn't someone just land it?

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Submit a merge proposal.

Changed in launchpad-foundations:
assignee: nobody → Guilherme Salgado (salgado)
Revision history for this message
Guilherme Salgado (salgado) wrote :

The current timeout page has the link to disable edge redirects at the footer, just like other pages, so I'm wondering if it'd make sense to fix the javascript above so that the notification message (with a link identical to the one at the bottom, but more text) at the top or if I should just remove it.

Changed in launchpad-foundations:
status: Confirmed → In Progress
Revision history for this message
Guilherme Salgado (salgado) wrote :

In fact, the current timeout page does not have the link at the bottom, but with my fix for bug 528184 it does.

Revision history for this message
Ursula Junque (ursinha) wrote : Bug fixed by a commit
Changed in launchpad-foundations:
milestone: none → 10.03
status: In Progress → Fix Committed
Ursula Junque (ursinha)
tags: added: qa-needstesting
tags: added: qa-ok
removed: qa-needstesting
Revision history for this message
Curtis Hovey (sinzui) wrote : Bug 403863 Fix released

Fixed released in launchpad-project 10.03.

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.