bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

appfilter=firefox searches don't work. Many many links finding no results



addons.mozilla.org Graveyard
Public Pages
12 years ago
2 years ago


(Reporter: shaver, Assigned: morgamic)



(Whiteboard: Workaround: click search, then search options, and don't specify an app, URL)


(1 attachment)

I would expect to see a list of add-ons, probably similar to the one I see at https://addons.mozilla.org/search.php?sort=newest .  Not sure what the roles of "app=" and "appfilter=" are in the URL, but apparently they're making things sad.

Comment 1

12 years ago
https://addons.mozilla.org/search.php?appfilter=firefox&sort=newest still shows none.
https://addons.mozilla.org/search.php?app=firefox&&sort=newest produces results, but it brings up tb-only add-ons such as Lightning.

I'm guessing app is how ou arrived at search.php (eg. from the firefox, thunderbird or suite homepage) and appfilter iswhat you actually selected to be the filter - not sure though.

Upping severity to critical - "there's probably been thousands of hits just while we've been sitting here discussing it"

Narrowing it down we're looking at appids as numbers. Shaver mumbled something about Firefox 0.8 and the difference between an app and a product.
Severity: major → critical
App ID 24 is for "Firefox 0.8" (which I recently made a private version, but making it public again doesn't fix this).  I don't honestly understand how "search for Firefox stuff" can be represented as a single app version in that drop-down, given that we have about 15 appIDs for Firefox currently.  Maybe that's just something I need to figure out for myself!

Seems like we should be using all the (public) app IDs there, perhaps, so that we get all of the appropriate versions in our results?

Comment 3

12 years ago
Adjusting summary so I can dupe stuff to this.

All category links in the sidebars on /extensions/ and /themes/ don't work, the links on the front page under "browse by category" don't work.

This is only a problem when you're browsing Firefox add-ons. If you run over to mozilla or thunderbird add-ons, it's all good.
Priority: -- → P1
Summary: clicking "recently added" on the front page finds no results → appfilter=firefox searches don't work. Many many links finding no results
Whiteboard: Workaround: click search, then search options, and don't specify an app

Comment 4

12 years ago
*** Bug 343615 has been marked as a duplicate of this bug. ***

Comment 5

12 years ago
*** Bug 343622 has been marked as a duplicate of this bug. ***

Comment 6

12 years ago
From what I can tell in search.php, if the appfilter argument is not an integer, it is converted to an integer by finding the corresponding entry in $appSelectList, which apparently has Firefox listed as 24, which is the AppID for FF 1.0PR.  Mozilla and Thunderbird, however, have 2 and 18 respectively, which both correspond with the applications' first entries in the applications table, when ordering by AppID.

By this logic, appfilter=firefox should be converted to appfilter=1, but it's not.  This would be because of the results retrieved in getApps() in shared/lib/amo.class.php.  Is it possible that it's due to the results of that query not being ordered?  For some reason, I can't replicate this bug in my install, but I'd bet that adding a "ORDER BY AppID" to that query would fix this. (If you manually change appfilter=firefox to appfilter=1 in the query, you'll get the correct results.) I don't have a lot of experience with the code, but this would be my best guess.

Comment 7

12 years ago
That's it, we had to copy over the new database dump in order to reproduce the problem.

The filter should just be a name, really -- specific appid's are too limiting since there are different appid's for different versions of firefox.

Since we aren't filtering by app version, we don't need that granularity -- and can always add it in later using a better method.

So what I'm going to do is remove this alpha->numeric change and adjust the form so it doesn't use appid's and instead uses the appname.  Will post a patch shortly.
Assignee: nobody → morgamic

Comment 8

12 years ago
Created attachment 228153 [details] [diff] [review]
Patch to remove int conversion for appfilter.

This should remove the reliance on appid, which is incorrect given the current database.  Not sure why this happened all of a sudden.
Attachment #228153 - Flags: first-review?(clouserw)
Comment on attachment 228153 [details] [diff] [review]
Patch to remove int conversion for appfilter.

Attachment #228153 - Flags: first-review?(clouserw) → first-review+

Comment 10

12 years ago
Checked in, needs to be updated in prod.
Depends on: 343649


12 years ago
Last Resolved: 12 years ago
Resolution: --- → FIXED

Comment 11

12 years ago
Great Job fixin it, now I can browse around for addons.
Sounds like VERIFIED to me!

Comment 13

12 years ago
(In reply to comment #12)
> Sounds like VERIFIED to me!

Thanks!  That was some great customer service! :)   I also liked how I got to watch the progress of it. Thanks again for the quick work. 
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.