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: order when loading more than 10 relations #21855

Merged
merged 3 commits into from
Oct 22, 2024
Merged

Conversation

Marc-Roig
Copy link
Contributor

What does it do?

Fix loading more than 2 pages of relations in the content manager.

Relations are assigned a temp_key value based on their order (a0, a1, ..., z1, z2) . Each time a page was loaded the new temp keys were based from the first temp key of the list (a0), but that same value was used to compute the temp keys for the 3rd , ... pages. So the order was messed up.

How to test it?

Load more than 10 relations in a relational field.

Related issue(s)/PR(s)

Fixes #21808

Verified

This commit was signed with the committer’s verified signature.
targos Michaël Zasso
@Marc-Roig Marc-Roig added source: core:content-manager Source is core/content-manager package pr: fix This PR is fixing a bug labels Oct 15, 2024
@Marc-Roig Marc-Roig self-assigned this Oct 15, 2024
Copy link

vercel bot commented Oct 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
contributor-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2024 8:56am

@Marc-Roig Marc-Roig changed the title fix: relations page loading fix: order when loading more than 10 relations Oct 15, 2024
Copy link
Contributor

@remidej remidej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see an issue when trying to save after reordering unsaved relations

CleanShot.2024-10-17.at.12.28.24.mp4

@Marc-Roig
Copy link
Contributor Author

will take a look! good catch

@Marc-Roig
Copy link
Contributor Author

@remidej I am not being able to replicate your issue (using the same content types and relation) , do you have any API error or cli error?

Copy link
Contributor

@remidej remidej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing my error again after doing the same actions. Weird! Looks like I messed up something last time. Looks all good now

@Marc-Roig Marc-Roig merged commit 3db8f1f into develop Oct 22, 2024
38 of 40 checks passed
@Marc-Roig Marc-Roig deleted the fix/relation-pages branch October 22, 2024 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: core:content-manager Source is core/content-manager package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content Manager: With >10 relations, display order is wrong
2 participants