Closed
Bug 562765
Opened 14 years ago
Closed 14 years ago
Searching for add-ons doesn't show results when there is no description set for an add-on
Categories
(Toolkit :: Add-ons Manager, defect, P1)
Toolkit
Add-ons Manager
Tracking
()
VERIFIED
FIXED
mozilla1.9.3a5
People
(Reporter: whimboo, Assigned: robert.strong.bugs)
References
Details
(Whiteboard: [rewrite])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
Unfocused
:
review+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100427 Minefield/3.7a5pre If you start a search in the top bar for add-on types other than extensions no result is returned. We should support searching for all kinds of add-ons.
Comment 1•14 years ago
|
||
Er, can you double check this? It's never been restricted to just extensions. I just tested by searching for flash and got the Flash plugin as a result.
![]() |
Assignee | |
Comment 2•14 years ago
|
||
When I search for flash (it is installed) I get no results and the following in the error console Warning: WARN addons.manager: Exception calling callback: TypeError: aStr is null
![]() |
Assignee | |
Comment 3•14 years ago
|
||
btw: if I search for an installed extension it does display in the results but I see that same error. Searching for a plugin or a theme has so far failed each time. I have also seen the following in the error console Warning: reference to undefined property aTheme[prop] Source File: file:///C:/Program%20Files%20(x86)/Minefield/modules/LightweightThemeManager.jsm Line: 398
Comment 4•14 years ago
|
||
(In reply to comment #3) > btw: if I search for an installed extension it does display in the results but > I see that same error. Searching for a plugin or a theme has so far failed each > time. I have also seen the following in the error console > Warning: reference to undefined property aTheme[prop] > Source File: > file:///C:/Program%20Files%20(x86)/Minefield/modules/LightweightThemeManager.jsm > Line: 398 Filed bug 562848 for this - which will fix that warning, but may also fix this bug too.
![]() |
Assignee | |
Comment 5•14 years ago
|
||
That isn't the cause :(
![]() |
Assignee | |
Comment 6•14 years ago
|
||
This appears to be caused by extensions that don't have a description.
Comment 7•14 years ago
|
||
(In reply to comment #6) > This appears to be caused by extensions that don't have a description. Yea, that was my thinking. As in, the description property is null or undefined - right? I'd consider that an API bug, since description isn't an optional property.
![]() |
Assignee | |
Comment 8•14 years ago
|
||
The following returns null function getRDFValue(aLiteral) { if (aLiteral instanceof Ci.nsIRDFLiteral) return aLiteral.Value; if (aLiteral instanceof Ci.nsIRDFResource) return aLiteral.Value; if (aLiteral instanceof Ci.nsIRDFInt) return aLiteral.Value; return null; } and causes this since there is no description in the install.rdf... previously the code returned undefined.
![]() |
Assignee | |
Comment 9•14 years ago
|
||
I suspect description should be made optional (extensions have been doing this since there were ) should be handled in the same way this type of extension was created) and it should be handled in the same way as a missing homepageURL which I see is handled properly and is part of this same group in XPIProvider.jsm.
![]() |
Assignee | |
Comment 10•14 years ago
|
||
(In reply to comment #9) > I suspect description should be made optional (extensions have been doing this > since there were ) since there were this type of extension
Comment 11•14 years ago
|
||
(In reply to comment #9) > I suspect description should be made optional To me, optional means a provider doesn't have to implement it for its Addon objects (because of either technical restrictions, or it just doesn't make sense to implement it for a given addon type). But in this case, its implemented, but there's just lack of data - so an empty string should be supplied.
![]() |
Assignee | |
Comment 12•14 years ago
|
||
What if it is an optional integer or some other type? I personally think optional properties within a provider should return that the property doesn't exist (e.g. null). It looks like this is already handled when the homepageURL doesn't exist and could be handled in the same way.
![]() |
Assignee | |
Comment 13•14 years ago
|
||
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attachment #442623 -
Flags: review?(bmcbride)
![]() |
Assignee | |
Comment 14•14 years ago
|
||
Comment on attachment 442623 [details] [diff] [review] patch rev1 also fixes bug 562848... when a light weight theme doesn't have a description it returns undefined and ends up with undefined as the description. Blair, I pretty strongly think that the backend shouldn't return an empty string for an optional property that doesn't exist... are you ok with this?
Attachment #442623 -
Flags: review?(dtownsend)
![]() |
Assignee | |
Comment 15•14 years ago
|
||
btw: I could more easily split out the properties... kind of late.
![]() |
Assignee | |
Comment 16•14 years ago
|
||
Comment on attachment 442623 [details] [diff] [review] patch rev1 going to fix this up
Attachment #442623 -
Attachment is obsolete: true
Attachment #442623 -
Flags: review?(dtownsend)
Attachment #442623 -
Flags: review?(bmcbride)
![]() |
Assignee | |
Comment 17•14 years ago
|
||
Attachment #442626 -
Flags: review?(bmcbride)
![]() |
Assignee | |
Updated•14 years ago
|
Attachment #442626 -
Flags: review?(dtownsend)
Reporter | ||
Updated•14 years ago
|
Summary: Searching for add-ons should support all types of add-ons → Searching for add-ons doesn't show results when there is no description set for an add-on
Updated•14 years ago
|
Priority: -- → P1
Updated•14 years ago
|
Attachment #442626 -
Flags: review?(bmcbride) → review+
Comment 18•14 years ago
|
||
(In reply to comment #11) > (In reply to comment #9) > > I suspect description should be made optional > > To me, optional means a provider doesn't have to implement it for its Addon > objects (because of either technical restrictions, or it just doesn't make > sense to implement it for a given addon type). But in this case, its > implemented, but there's just lack of data - so an empty string should be > supplied. To me an optional property is one where either the provider need not implement it at all (and so it is not defined on the Addon instance) or the property's value may be null (or I suppose undefined too). In this case I think it was a mistake to say that description is a required property since we have never required that extensions have one so this looks like the correct fix to me.
Updated•14 years ago
|
Attachment #442626 -
Flags: review?(dtownsend)
Comment 19•14 years ago
|
||
(In reply to comment #14) > Blair, I pretty strongly think that the backend shouldn't return an empty > string for an optional property that doesn't exist... are you ok with this? For optional properties, yes that makes sense. And making description an optional property (comment 18) also sounds good. If description were to stay a required property and possibly be null/undefined, then I'd be uncomfortable.
![]() |
Assignee | |
Comment 20•14 years ago
|
||
In regards to providers, I think it would be a "good thing" to standardize whether a provider should return null or undefined for a value that isn't present and to throw when a required value the value isn't present which I believe it already.
Comment 21•14 years ago
|
||
http://hg.mozilla.org/projects/addonsmgr/rev/44975b9df5b1 (In reply to comment #20) > In regards to providers, I think it would be a "good thing" to standardize > whether a provider should return null or undefined for a value that isn't > present and to throw when a required value the value isn't present which I > believe it already. Agreed. Though, I don't think any of the providers currently throw in that case (its unfortunate that its up to the provider to ensure that).
Whiteboard: [rewrite] → [rewrite][fixed-in-addonsmgr]
Updated•14 years ago
|
Whiteboard: [rewrite][fixed-in-addonsmgr] → [rewrite][fixed-in-addonsmgr][needs-landing]
Comment 22•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/42101b017a4b
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [rewrite][fixed-in-addonsmgr][needs-landing] → [rewrite]
Target Milestone: --- → mozilla1.9.3a5
Reporter | ||
Comment 23•14 years ago
|
||
Verified fixed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100517 Minefield/3.7a5pre (.NET CLR 3.5.30729) ID:20100517035949 Can we do something here with automated tests regarding the missing availability of different types of add-ons on the testing machines. I think a Litmus test is a must have.
Status: RESOLVED → VERIFIED
Flags: in-testsuite?
Flags: in-litmus?
Comment 24•14 years ago
|
||
It's likely difficult to cover this specific case with an automated test, Blair what do you think?
Comment 25•14 years ago
|
||
(In reply to comment #24) > It's likely difficult to cover this specific case with an automated test, Blair > what do you think? Agreed.
Flags: in-testsuite? → in-testsuite-
Reporter | ||
Comment 26•14 years ago
|
||
When we are talking about the description, which one is causing this problem? The one under <em:name>, right? Dave, when I would create a sample XPI, is there a way to make that extension compatible with any future version of Firefox? Setting maxVersion to something like 100 or is there a better approach?
![]() |
Assignee | |
Comment 27•14 years ago
|
||
You could use Clean Fox or any persona that is missing a description and combine this with the litmus test for bug 562848. With Clean Fox it will not show up in the search results for "Clean" without this fix and will with this fix.
Comment 28•14 years ago
|
||
(In reply to comment #26) > When we are talking about the description, which one is causing this problem? > The one under <em:name>, right? Dave, when I would create a sample XPI, is > there a way to make that extension compatible with any future version of > Firefox? Setting maxVersion to something like 100 or is there a better > approach? The one in <em:description> was the problem here.
Comment 29•14 years ago
|
||
Want to try automating this after all.
Flags: in-testsuite- → in-testsuite?
Reporter | ||
Comment 30•14 years ago
|
||
Verified fixed with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a6pre) Gecko/20100611 Minefield/3.7a6pre Thanks Blair, I will unflag in-litmus for now. If you can't automate it, I will add a Mozmill test instead.
Flags: in-litmus? → in-litmus-
Updated•10 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•