Extras isn't pulling in screenshots

Bug #987838 reported by Dave Morley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Apps Directory
Fix Released
Low
Michael Nelson

Bug Description

Bug Description:
Extras isn't displaying screenshots, even though it has them in USC

UAD Version:
Django 1.3
Python 2.6.5 (r265:79063, Apr 16 2010, 14:15:55) [GCC 4.4.3]
preflight 0.1

OS:
64bit precise

Browser:
FF 11.0

Problem URL:
https://apps.ubuntu.com/cat/applications/oneiric/unity-lens-askubuntu/

Steps To Reproduce:
1. goto the link above
2. open USC in Oneiric
3. check the ask ubuntu lens in both
4. USC has a screenchot UAD doesn't

Expected Result:
I expect what I see in USC to be displayed in UAD

Related branches

Dave Morley (davmor2)
Changed in ubuntu-webcatalog:
importance: Undecided → Low
description: updated
Changed in ubuntu-webcatalog:
status: New → Confirmed
Revision history for this message
Michael Nelson (michael.nelson) wrote :

This can be verified by someone with admin access, but I think the issue is that the application_screenshots view is 404'ing:

https://apps.ubuntu.com/cat/applications/screenshots/unity-lens-askubuntu/

because the package isn't marked as the latest package. I get the same 404 locally for the firefox package, and noticed this:

{{{
235 def application_screenshots(request, package_name):
236 import pdb;pdb.set_trace()
237 -> app = get_object_or_404(Application, package_name=package_name,
238 is_latest=True)
239 screenshots = WebServices().get_screenshots_for_package(package_name)
240 return HttpResponse(json.dumps(screenshots),
241 mimetype='application/json')
242
(Pdb) Application.objects.get(package_name=package_name)
<Application: Safe and easy web browser from Mozilla (firefox)>
(Pdb) Application.objects.get(package_name=package_name, is_latest=True)
*** DoesNotExist: Application matching query does not exist.
}}}

Revision history for this message
Michael Nelson (michael.nelson) wrote :

The attached branch simply ensures that the screenshot view is not dependent on the redundant (and perhaps-not-set) is_latest field.

Another part of the fix for this should be ensuring that the check_all_latest command is run after each import (import_app_install_data and import_for_purchase), but I want to check with achuni about that first as it looks like the kind of command we wouldn't want to run unnecessarily (ie. after each import of a distroseries, but rather after importing all distroseries - which may be why it's been left manual).

Changed in ubuntu-webcatalog:
status: Confirmed → Fix Committed
Revision history for this message
Michael Nelson (michael.nelson) wrote :

So the attached branch fixed one issue, we'll no longer get a 404 at

https://apps.ubuntu.com/cat/applications/screenshots/unity-lens-askubuntu/

but an empty list. achuni noted:

14:46 < achuni> noodles: hmmm I was going to say that extras uses a custom field on the package data
                to specify the screenshot url, but I can't remember what it was now
14:47 < noodles> achuni: ah k, I'll take a look now.
14:47 < achuni> noodles: we're currently checking the desktop file for the screenshot url, but
                extras doesn't have an app-install-data package
14:47 < achuni> noodles: so that's in the apt-cache data for extras

Changed in ubuntu-webcatalog:
assignee: nobody → Michael Nelson (michael.nelson)
milestone: none → 12.05
Dave Morley (davmor2)
Changed in ubuntu-webcatalog:
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.