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

BUG: only the "post" indexable is acted upon when a site's status changes #2275

Closed
dustinrue opened this issue Jul 20, 2021 · 1 comment · Fixed by #2284
Closed

BUG: only the "post" indexable is acted upon when a site's status changes #2275

dustinrue opened this issue Jul 20, 2021 · 1 comment · Fixed by #2284

Comments

@dustinrue
Copy link
Contributor

Describe the bug
When a site in a multisite setup is updated so that it is archived, deleted or marked as spam, only the "post" indexable will be acted upon because it is the only indexable that adds actions for those items (https://github.com/10up/ElasticPress/blob/3.6.1/includes/classes/Indexable/Post/SyncManager.php#L53 vs https://github.com/10up/ElasticPress/blob/3.6.1/includes/classes/Indexable/Term/SyncManager.php#L37). This leaves data on the backend server.

Steps to Reproduce

  1. Have a multisite
  2. Create an additional site
  3. Enable some other indexable in the dashboard, such as terms
  4. Index all sites
  5. Note the indexes created in the backend
  6. Mark a site as deleted
  7. Note the index that still exist in the backend will include indexable items other than post

Expected behavior

All indexes should be removed from the backend server/service

Screenshots

Environment information

  • Device:
  • OS:
  • Browser and version:
  • WordPress version:
  • ElasticPress version:
  • Elasticsearch version:
  • Where do you host your Elasticsearch server?
  • What ElasticPress features do you have currently active?
  • Plugins and version:
  • Theme and version:
  • Site Health Info:

Additional context

@dustinrue dustinrue added the bug Something isn't working label Jul 20, 2021
@felipeelia
Copy link
Member

felipeelia commented Jul 20, 2021

To have it fixed on all Indexables, we probably should move that code to the Indexable class, testing if it is global or not and acting accordingly.

@Rahmon Rahmon added confirmed bug and removed bug Something isn't working labels Jul 23, 2021
@mckdemps mckdemps added this to the 3.6.2 milestone Jul 27, 2021
dustinrue added a commit to dustinrue/ElasticPress that referenced this issue Aug 1, 2021
@dustinrue dustinrue mentioned this issue Aug 1, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants