Inline-block with a relationship field cannot publish-unpublish-publish
Link to reproduction
https://github.com/shefing/payload_Inline_block_with_relationship/tree/Inline_block_with_relationship
Environment Info
Output from 'pnpm payload info': Binaries: Node: 20.9.0 npm: 10.2.5 Yarn: 1.22.21 pnpm: 9.10.0 Relevant Packages: payload: 3.0.0-beta.104 next: 15.0.0-canary.104 @payloadcms/db-mongodb: 3.0.0-beta.104 @payloadcms/graphql: 3.0.0-beta.104 @payloadcms/live-preview: 3.0.0-beta.104 @payloadcms/next/utilities: 3.0.0-beta.104 @payloadcms/plugin-cloud-storage: 3.0.0-beta.104 @payloadcms/plugin-redirects: 3.0.0-beta.104 @payloadcms/plugin-seo: 3.0.0-beta.104 @payloadcms/richtext-lexical: 3.0.0-beta.104 @payloadcms/storage-s3: 3.0.0-beta.104 @payloadcms/translations: 3.0.0-beta.104 @payloadcms/ui/shared: 3.0.0-beta.104 react: 19.0.0-rc-06d0b89e-20240801 react-dom: 19.0.0-rc-06d0b89e-20240801
Describe the Bug
When creating an inline-block with a relationship field The following scenario is problematic: Publishing the page, un-publishing, and then publishing again - the page cannot publish. Workaround : refresh the page and then publishing works
Reproduction Steps
Steps to reproduce:
- Clone the link to reproduction ripo and launch Payload
- Create a new Post instance
- Add the inline-block in the rich-text field
- Choose a value and save the inline-block
- Publish the page
- Un-publish the page
- Publish the page again
Expected: Page is published
Actual:
Page cannot publish - getting an error : "The following fields are invalid - richText" (see attached screenshot )
Adapters and Plugins
db_mongoDB
Thanks for reporting!
This was fixed in v3.0.0-beta.128, particularly in https://github.com/payloadcms/payload/pull/8364
The problem was that depth=0 was missing in the request that appears in packages/ui/src/elements/Status/index.tsx
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.