payload icon indicating copy to clipboard operation
payload copied to clipboard

Inline-block with a relationship field cannot publish-unpublish-publish

Open ChannKan opened this issue 1 year ago • 6 comments

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:

  1. Clone the link to reproduction ripo and launch Payload
  2. Create a new Post instance
  3. Add the inline-block in the rich-text field
  4. Choose a value and save the inline-block
  5. Publish the page
  6. Un-publish the page
  7. Publish the page again

Expected: Page is published

Actual: Page cannot publish - getting an error : "The following fields are invalid - richText" (see attached screenshot ) Image

Adapters and Plugins

db_mongoDB

ChannKan avatar Oct 13 '24 17:10 ChannKan

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

GermanJablo avatar Nov 21 '24 16:11 GermanJablo

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Nov 23 '24 04:11 github-actions[bot]