Skip to content

fix(drizzle): fix localizeStatus failing to retrieve last version#5

Open
deepshekhardas wants to merge 2 commits into
mainfrom
fix/localizeStatus-version-retrieval
Open

fix(drizzle): fix localizeStatus failing to retrieve last version#5
deepshekhardas wants to merge 2 commits into
mainfrom
fix/localizeStatus-version-retrieval

Conversation

@deepshekhardas

@deepshekhardas deepshekhardas commented May 19, 2026

Copy link
Copy Markdown
Owner

Description

When using localizeStatus, the last version wasn't retrieved properly when publishing directly. This is because the version_updatedAt and version_createdAt weren't being set properly when publishing.

The fix adds a check for localized status (_status) in locales to ensure main row data update happens even when only localized fields have changed.

Testing

  • Create document with localized fields
  • Use localizeStatus
  • Edit and publish directly
  • Should now retrieve correct last version instead of draft

Fixes: payloadcms#16395


Summary by cubic

Fixes last-version retrieval when publishing localized docs by updating drizzle upsert logic. Also adds plugin-mcp support for the Payload API-Key Authorization header alongside Bearer.

Written for commit aaec894. Summary will update on new commits. Review in cubic

Developer added 2 commits May 19, 2026 10:24
The MCP endpoint was accepting only Bearer token but Payload convention
uses 'payload-mcp-api-keys API-Key <key>' format. Now accepts both:
- 'payload-mcp-api-keys API-Key <key>' (Payload convention)
- 'Bearer <key>' (backwards compatible)

This makes the plugin consistent with other Payload API-key surfaces.

Fixes: payloadcms#16572
When using localizeStatus, the last version wasn't retrieved properly
when publishing directly. This is because the version_updatedAt and
version_createdAt weren't being set properly when publishing.

The fix adds a check for localized status (_status) in locales to
ensure main row data update happens even when only localized fields
have changed.

Fixes: payloadcms#16395

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

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

Projects

None yet

1 participant