Closed ValentinaPC closed 6 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.
@kumar303 : Are you talking about this https://github.com/mozilla/addons/issues/10389 ? :)
@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/
@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.
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.
Verified this issue on AMO dev and AMO stage with FF59 (Win10) and it is no longer reproducible.
Steps to reproduce:
Expected results: License link is displayed.
Actual results: License link is not displayed.
Notes/Issues: