fix(drizzle): fix localizeStatus failing to retrieve last version#5
Open
deepshekhardas wants to merge 2 commits into
Open
fix(drizzle): fix localizeStatus failing to retrieve last version#5deepshekhardas wants to merge 2 commits into
deepshekhardas wants to merge 2 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Fixes: payloadcms#16395
Summary by cubic
Fixes last-version retrieval when publishing localized docs by updating
drizzleupsert logic. Also addsplugin-mcpsupport for the Payload API-Key Authorization header alongside Bearer.drizzle: treat localized_statuschanges as main row updates soversion_createdAt/version_updatedAtare set;localizeStatusnow returns the latest published version (fixes localizeStatus: fail to retrieve last version payloadcms/payload#16395).plugin-mcp: accept both "payload-mcp-api-keys API-Key " and "Bearer " Authorization patterns for API key auth (fixes plugin-mcp 3.84.1: docs/code mismatch on/api/mcpAuthorization header — code accepts onlyBearer X, Payload convention would bepayload-mcp-api-keys API-Key Xpayloadcms/payload#16572).Written for commit aaec894. Summary will update on new commits. Review in cubic