LocationError: 'tags_cloud_data' on project bugs' page

Bug #708693 reported by Ursula Junque
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
j.c.sackett

Bug Description

As seen on OOPS-1853K1502:

Module zope.traversing.adapters, line 138, in traversePathElement
return traversable.traverse(nm, further_path)
__traceback_info__: (<zope.browserpage.metaconfigure.SimpleViewClass from /srv/launchpad.net/production/launchpad-rev-12248/lib/lp/bugs/browser/../templates/bugtarget-portlet-tags-content.pt object at 0x2acc3007d690>, 'tags_cloud_data')
Module zope.traversing.adapters, line 52, in traverse
raise LocationError(subject, name)
__traceback_info__: (<zope.browserpage.metaconfigure.SimpleViewClass from /srv/launchpad.net/production/launchpad-rev-12248/lib/lp/bugs/browser/../templates/bugtarget-portlet-tags-content.pt object at 0x2acc3007d690>, 'tags_cloud_data', [])
LocationError: (<zope.browserpage.metaconfigure.SimpleViewClass from /srv/launchpad.net/production/launchpad-rev-12248/lib/lp/bugs/browser/../templates/bugtarget-portlet-tags-content.pt object at 0x2acc3007d690>, 'tags_cloud_data')<br />

This should OOPS when we go to the project bugs' page, but it doesn't. What happens is if you try to access a project which apparently doesn't have tags, the portlet is empty, but it doesn't OOPS. If you try to access directly the url of the portlet, it results on that OOPS.

1) https://bugs.launchpad.net/mysql - empty portlet
2) https://bugs.launchpad.net/mysql/+bugtarget-portlet-tags-content - oops!

Not sure how bad this is, as we can't reproduce that unless accessing the portlet url directly. Maybe we should display the empty tagcloud with a title or just doesn't show the empty box at all (but that would be another bug).

Related branches

j.c.sackett (jcsackett)
Changed in launchpad:
assignee: nobody → j.c.sackett (jcsackett)
status: Triaged → In Progress
Revision history for this message
j.c.sackett (jcsackett) wrote :

This isn't actually a LocationError, or at least, the same error can be reproduced on lp.dev and isn't actually a LocationError.

There's a line in the tags_cloud_data property that's causing the error, which gets trapped and raised as a LocationError.

>>> tags = [ tag for tag in tags if tag['tag'] in official_tags + popular_tags]

official_tags is a stormset, popular_tags is a list. You can see this on http://bugs.launchpad.dev/mozilla/+bugtarget-portlet-tags-content; casting official_tags to list before this line fixes it (which one might as well do anyway, as one iterates over official_tags several times in the method).

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
milestone: none → 11.02
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.

Other bug subscribers

Remote bug watches

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