Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems adding themes for the featured theme collections from django pages #6312

Closed
ioanarusiczki opened this issue Jan 15, 2019 · 8 comments · Fixed by mozilla/addons-server#11821
Assignees
Labels
component:admin_tools component:themes issues about (webextension) themes migration:no-jira migration:2024 priority:p2 Issues at this level should be fixed within the next few releases. repository:addons-server Issue relating to addons-server state:verified_fixed type:bug

Comments

@ioanarusiczki
Copy link

Prerequisites:
django admin pages
The user is an Admin or Collections:Contribute

STR:

  1. Go to the featured themes collection from django https://addons-internal.dev.mozaws.net/en-US/admin/models/bandwagon/collection/2143965/change/
  2. Add some themes and click "Save"
  3. Go to AMO homepage observe the featured collection

Expected result:
The added themes are visible.

Actual result:
Only the second time after "Save" is clicked the collection is updated on AMO frontend.

Notes:
This issue is reproducible on AMO dev with FF64 (Win10).

must save twice

@ioanarusiczki
Copy link
Author

@diox I could reproduce this issue on AMO stage with FF67(Win10).

Perhaps this information helps:

  • I've also noticed now that after clicking the "Save" button when adding themes the message "The collection "Featured Themes (12) was changed successfully" will only update the correct number of existing themes when I click "Save" one more time.
    Here's an example - I added theme number 12 and clicked "Save" but the message is "The collection "Featured Themes (11) was changed successfully". The second time it showed the correct number (12).

reproducible on stage1

  • when removing a theme the the message "The collection "Featured Themes (N) was changed successfully" indicated again a wrong number yet on the frontend the collection is updated successfully.

@ioanarusiczki
Copy link
Author

ioanarusiczki commented Jul 10, 2019

I can't tell if this issue is reproducible on prod or not but I see that it affects the appearance of the Recommended badge for themes added in the collection in the search results, More themes by , User profile page and so on except for the detail page of the add-on.

To further explain: If I add a theme and Save changes the badge will be available on the detail page only and only if I Save changes one more time the badge will be available for all the other places.

Perhaps @wagnerand could help to confirm if this is an issue only reproducible on the testing servers or it's also an issue on prod too.

@wagnerand
Copy link
Member

Apart from this sounding like an odd bug, we are not recommending themes at the moment, are we?

@ioanarusiczki
Copy link
Author

@wagnerand Not yet, but this should affect right now the featured theme collection on prod with the original problem as described above
The collection should serve for making the recommended themes instead of featured (starting at the end of this week).

@wagnerand
Copy link
Member

Yes, I can reproduce this behavior in prod as well.

@wagnerand
Copy link
Member

Raising priority as this affects recommendations.

@wagnerand wagnerand added the priority:p2 Issues at this level should be fixed within the next few releases. label Jul 10, 2019
@eviljeff eviljeff self-assigned this Jul 10, 2019
@eviljeff
Copy link
Member

After looking at the code I'm pretty sure it's because in django admin the Collection instance either isn't saved when a CollectionAddon instance is created, or it's saved before the CollectionAddon is created, so things like the ES index and the featured status cache are updated too early.

We had specific methods for adding and removing add-ons that specifically saved the Collection afterwards but it appears they were only used by the legacy frontend.

@ioanarusiczki
Copy link
Author

@eviljeff This has been fixed on -dev , once I add a theme in the collection, it will show up for the homepage, recommended badge is attached in search results, user profile too , no need to click save twice.

While removing themes I've noticed an issue and filed a followup #6810

@KevinMind KevinMind transferred this issue from mozilla/addons-server May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:admin_tools component:themes issues about (webextension) themes migration:no-jira migration:2024 priority:p2 Issues at this level should be fixed within the next few releases. repository:addons-server Issue relating to addons-server state:verified_fixed type:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants