Skip to content

fix(ui): pass the locale to reorder endpoint in orderable table#14839

Merged
paulpopus merged 3 commits intopayloadcms:mainfrom
AaronClaes:fix/orderable-table-missing-locale
Jan 22, 2026
Merged

fix(ui): pass the locale to reorder endpoint in orderable table#14839
paulpopus merged 3 commits intopayloadcms:mainfrom
AaronClaes:fix/orderable-table-missing-locale

Conversation

@AaronClaes
Copy link
Contributor

@AaronClaes AaronClaes commented Dec 6, 2025

What?

When you have multiple locales and required localized fields, the orderable functionality breaks.
This happens when you create documents in a locale that is not the default and try to reorder.

The reorder operation uses the default locale, which will have empty data in this case, and fails because the required fields are not filled in.

For more info, see #14684

Why?

Currently it is impossible to reorder items when the active locale has valid data, but the default locale does not.

How?

By passing the active locale to the endpoint, the validation will run against for the active locale, instead of the default locale.
Which allows the operation to succeed.

Before:

${config.serverURL}${config.routes.api}/reorder

After:

${config.serverURL}${config.routes.api}/reorder?locale=${localeCode}

Fixes #14684

JarrodMFlesch
JarrodMFlesch previously approved these changes Jan 8, 2026
@JarrodMFlesch JarrodMFlesch enabled auto-merge (squash) January 8, 2026 20:14
@JarrodMFlesch JarrodMFlesch disabled auto-merge January 8, 2026 20:14
@JarrodMFlesch JarrodMFlesch enabled auto-merge (squash) January 8, 2026 20:14
@AaronClaes
Copy link
Contributor Author

Hi @JarrodMFlesch, thanks for looking into the PR!
Does anything else need to happen here for this to get merged?

@paulpopus paulpopus disabled auto-merge January 22, 2026 17:50
@paulpopus paulpopus merged commit d6bb3de into payloadcms:main Jan 22, 2026
100 checks passed
@github-actions
Copy link
Contributor

🚀 This is included in version v3.73.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Orderable operation validates against default locale instead of active locale

3 participants