When viewing a collection,
as above
The count = the actual # of add-ons in the collection. That all the add-ons in the collection get listed.
Example:
https://addons.mozilla.org/en-GB/firefox/collections/smayer97/for-mr-tech-toolkit/
Shows a count of 35 add-ons at top of the page.
Actual # add-ons displayed is only 31 (25 on page 1 and 6 on page 2).
Actual # add-ons in the collection is 39.
So the count is way off and not all add-ons are showing.
Sorry, my last count is wrong -- should be 33 intead of 39.
Another example is https://addons.mozilla.org/en-GB/firefox/collections/smayer97/for-ff-57/
Count at tope of page says 13.
Actual # listed on page is 12.
Actual # add-ons in the collection is 13.
So in this case, count is correct but the list is not showing them all.
And for good measure, another example is https://addons.mozilla.org/en-GB/firefox/collections/smayer97/for-search-engines/
Count at top of page says 8.
Actual # listed on page is 10.
Actual # add-ons in the collection is 11.
So both count and list of add-ons are incorrect.
I tested this issue here and here but I could not reproduce it on AMO with FF59 (Win10).
Could you provide some steps to reproduce it?
I made a list of 10 then I clicked the edit collection link and continued to add other add-ons to increase the number. They are not listed in the order they were added into the collection but the total number with what's display match in my case.
I'll have to dig a little further but were your tests for NEW collections created?
My tests for simply on old existing collections and I did not attempt to add or remove any add-ons. I only pulled up existing ones.
Double-checked...using FF 59.0.2 (Win 10), FF 48.0.2 (Mac OS X 10.6.8), and even Chrome 49.0.2623.112 and the results are the same. So not browser-based issue.
This can be reproduced with older collections. I have some examples from -dev also:
https://addons-dev.allizom.org/en-US/firefox/collections/theparadox/paranoia/
https://addons-dev.allizom.org/en-US/firefox/collections/mozilla/reference/
https://addons-dev.allizom.org/en-US/firefox/collections/the-shareaholic-team/google/
I'll look into this.
I have verified that the addon_count for a collection returned by the API is not always accurate and have opened https://github.com/mozilla/addons-server/issues/8065 regarding that. The problem seems to occur when an add-on in a collection is removed from the site.
One example above (https://github.com/mozilla/addons-frontend/issues/4789#issuecomment-381111677) states that the count displayed is less than the number of add-ons displayed, and what I just reported above would not account for that. I'll see if I can get some more info on that collection.
I verified the same counts as reported at https://github.com/mozilla/addons-frontend/issues/4789#issuecomment-381111677, and have added that as an example to the issue I opened at https://github.com/mozilla/addons-server/issues/8065. The fact that there are 11 add-ons in the collection but only 10 shown might again be due to one of them being removed from the site, but the count of 8 displayed is a mystery which will hopefully be solved via https://github.com/mozilla/addons-server/issues/8065.
Note for QA:
Note that this fixes the count of add-ons in a collection as displayed on the Collection Detail page, but it does not fix the number of add-ons displayed per collection on the Collection Listing page. Please see mozilla/addons-server#8065 (comment) for a discussion/explanation for that.
Note also that if you visit the Collection Listing page and observe an incorrect count, then visit the Collection Detail page for a collection, and then visit the Collection Listing page again, the count on the Listing page will now display the correct count. That is because the correct count is loaded via the Detail page.
@bobsilverberg I tested this with my collections, the samples mentioned here, collections 25+ such as https://addons-dev.allizom.org/en-US/firefox/collections/10640485/collection-100-more/ and https://addons-dev.allizom.org/en-US/firefox/collections/10640485/Kelpie/ and I did not find problems on AMO dev, FF64 (Win10).
Right now this is still reproducible on AMO stage, I found 2 personal collections with this problem
https://addons.allizom.org/en-US/firefox/collections/11686419/Collection1009fortestingstage/
https://addons.allizom.org/en-US/firefox/collections/11686419/New345445/
I'll re-check this issue on stage too when it lands.
The number of add-ons is correct for my AMO stage collections too.
Verified with FF64(Win10).
