JS error on all pages with no portlet column ("_2fe has no properties")

Bug #128237 reported by Matthew Paul Thomas
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Undecided
James Henstridge

Bug Description

All pages that do not have a portlet column, including Launchpad's front page, have a JavaScript error:
------------
_2fe has no properties - MochiKit.js (line 2880)
getElementsByTagAndClassName("div", "portlet", null)
initPortlets()launchpad.js (line 29)
onLoadFunction()launchpad.net (line 42)
(no name)(load )MochiKit.js (line 3863)
[Break on this error] var _300=(_2fe.getElementsByTagName(_2fc)||self._document.all);
------------

Revision history for this message
Curtis Hovey (sinzui) wrote :

This relates to, and maybe a duplicate of <https://bugs.launchpad.net/launchpad/+bug/127172> Javascript error on answers.launchpad.net. The error relates to looking for elements of 'foldable' class.

Revision history for this message
James Henstridge (jamesh) wrote :

So the offending line is:
    var portlets = getElementsByTagAndClassName('div', 'portlet', 'portlets');

I guess we should do a manual getElementById('portlets') first, and return early if it doesn't exist. As I have rewritten this bit of javascript in my sticky-portlets branch, I may as well fix it there.

Changed in launchpad:
assignee: nobody → jamesh
status: New → Confirmed
Revision history for this message
Curtis Hovey (sinzui) wrote :

I have filed a bug with Mochikit: <http://trac.mochikit.com/ticket/255>.

Revision history for this message
James Henstridge (jamesh) wrote :

The described problem was fixed back in r4718. I forgot to mark it fixed.

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

Other bug subscribers

Remote bug watches

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