mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
127 stars 41 forks source link

License link is not listed in add-on details page until after refresh #10402

Closed ValentinaPC closed 6 years ago

ValentinaPC commented 7 years ago

Steps to reproduce:

  1. Load details page for an add-on that has license (there are a bunch of old add-ons without license)
  2. Go to "More information" section and observe the license link

Expected results: License link is displayed.

Actual results: License link is not displayed.

Notes/Issues:

kumar303 commented 7 years ago

There is another bug similar to this but I can't find it. I think the root cause is that when the search results get loaded, we use the add-on data from those results to populate the add-on detail page. If you refresh the add-on detail page, it makes an actual API result to get add-on data.

I think we should stop using the add-on data from search results and always make an API request. The search results contain partial add-on data so it's only going to cause more bugs like this.

ValentinaPC commented 7 years ago

@kumar303 : Are you talking about this https://github.com/mozilla/addons/issues/10389 ? :)

tsl143 commented 7 years ago

@kumar303 Yes that is the cause. When we use addons/search API the License key is null When we use addons/addon/${slug} API the License key has desired data

Consider -> https://addons-dev.allizom.org/api/v3/addons/search/?app=android&q=facebook%20redirect&page=1&lang=en-GB

https://addons-dev.allizom.org/api/v3/addons/addon/flink-removal/

kumar303 commented 7 years ago

@tsl143 yes, exactly. I think we should just use the add-on detail API result for all cases. I plan to do that change as part of https://github.com/mozilla/addons/issues/10408

Are you talking about this mozilla/addons#10389 ? :)

That's similar but I don't think it's caused by the same exact problem. It would require some investigation to know for sure.

kumar303 commented 6 years ago

This was fixed in https://github.com/mozilla/addons/issues/10478 . I was able to verify it just now. Let me know if anyone can still reproduce the bug.

We definitely need to be careful about this data type in the future. I filed https://github.com/mozilla/addons/issues/11573 to help.

ioanarusiczki commented 6 years ago

Verified this issue on AMO dev and AMO stage with FF59 (Win10) and it is no longer reproducible.

licence