Closed Bug 520588 Opened 15 years ago Closed 15 years ago

add-ons validator not working for non-hosted add-on?

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bridget.almas, Assigned: u278084)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 GTB5 (.NET CLR 3.5.30729)
Build Identifier: 5.1

Bug 513135 says the add-ons validator is working for non-hosted add-ons, but it doesn't seem to be the case.  When I try to upload an add-on for validation, I get redirected to https://addons.mozilla.org/en-US/developers/addon/validate/undefined

Debugging the javascript, it appears that it may be caused by line 262 in developers.js:

if ($('#addon-list').val() != '') {
  window.location.href = BASEDIR + 'developers/addon/validate/' + $('#addon-list').val();
return false; 

I don't see an addon-list element in the source page.  Maybe this is because I haven't yet uploaded any add-ons? (The one I'm trying to validate is the first one I'm going to upload).  Is it possible this doesn't work if you don't have at least one hosted add-on?

Reproducible: Always

Steps to Reproduce:
1.Go to https://addons.mozilla.org/en-US/developers/addon/validate/
2. Try to upload an xpi file 

Actual Results:  
Get redirected to https://addons.mozilla.org/en-US/developers/addon/validate/undefined

Expected Results:  
Validation results
Target Milestone: --- → 5.2
Attached patch v1Splinter Review
I was having this issue on my local dev box. You are right, addon-list only shows when you have a add-on hosted. We need to check that the element exists before checking its value.
Assignee: nobody → cdolivei.bugzilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #405109 - Flags: review?(jbalogh)
Comment on attachment 405109 [details] [diff] [review]
v1

Since less work => less time running code, it's better to do the lookup once and cache it in a variable.  But it's not a big deal here.
Attachment #405109 - Flags: review?(jbalogh) → review+
Thanks Jeff. r53224
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: push-needed
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: