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(posts): use uniqueId as stkQueryId to ensure uniqueness even when… #3289

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

Arukuen
Copy link
Contributor

@Arukuen Arukuen commented Aug 11, 2024

… duplicated

fixes #3189

The problem arises from the stkQueryId attribute being also duplicated when the post block is duplicated. Only unique stkQueryId is assigned when new post blocks are created using useInstanceId.

Question: Is there a reason why in the previous implementation, uniqueId, which is always unique, was not used? If so, I can change the implementation to check all post blocks first before assigning stkQueryId to ensure uniqueness.

Copy link

github-actions bot commented Aug 11, 2024

🤖 Pull request artifacts

file commit
pr3289-stackable-3289-merge.zip 61369fd

github-actions bot added a commit that referenced this pull request Aug 11, 2024
github-actions bot added a commit that referenced this pull request Aug 12, 2024
github-actions bot added a commit that referenced this pull request Aug 17, 2024
@bfintal
Copy link
Contributor

bfintal commented Aug 23, 2024

Question: Is there a reason why in the previous implementation, uniqueId, which is always unique, was not used? If so, I can change the implementation to check all post blocks first before assigning stkQueryId to ensure uniqueness.

I believe that we were copying how it was done in the native posts block, where each post block has their own unique "instanceId" that is a marker so that query and pagination can be found when changing pages

@bfintal bfintal merged commit 0ae9cfe into develop Sep 5, 2024
1 of 6 checks passed
@bfintal bfintal deleted the fix/3189-post-block-uniqueness branch September 5, 2024 06:48
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.

Posts block - Load More/Pagination issue when duplicating Posts block
2 participants