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

fix: strapi 5 compatibility #16

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

Matthew-Kilpatrick
Copy link
Contributor

This fix relates to the issue raised in #15, plus another bug I identified while testing my fix for that issue - both of which seem to be caused by some of the strapi changes in version 5.

  • Fix index all action unindexing all documents: the default search results were only for draft articles which all had no publishedAt timestamp, causing them to be requested for deletion (https://docs.strapi.io/dev-docs/api/document-service/status).
  • Fix individual document create/update handling: a new document (string) ID has been added (which identifies the document across both its draft & published versions), which didn't match the (int) ID being used in the queries. I've updated the query to lookup documents post create/update to use the new documentID so that results get returned, and am filtering to only include published states to ensure the correct version is returned.

- Fix index all action unindexing all documents:
 the default search results were only for draft articles which all had no publishedAt timestamp,
 causing them to be requested for deletion.
- Fix individual document create/update handling:
 a new document (string) ID has been added,
 which didn't match the (int) ID being used in the queries.
@squelix squelix self-assigned this Oct 27, 2024
@squelix
Copy link
Contributor

squelix commented Oct 28, 2024

Fix #15

@squelix squelix merged commit 38cee83 into wizbii:main Oct 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants