payload icon indicating copy to clipboard operation
payload copied to clipboard

Error on saving Collection with versioning and localized content in arrays in blocks

Open Augigauki opened this issue 10 months ago • 1 comments

Link to reproduction

https://github.com/Augigauki/payload-array-block-bug-demo

Describe the Bug

A bug when you have localized content in multiple instances of the same array in a Blocks-field, and versioning is enabled on the collection.

To Reproduce

Outlined in the linked repo, but copying here for clarity:

Steps to reproduce:

  1. Clone repo
  2. Create a new page
  3. Add a block to the layout, selecting "Item" as the block
  4. Add an item (or more) to the block
  5. Add some content to localized textfield
  6. Add another block to the layout, selecting "Item" again
  7. Add some content to localized textfield
  8. Save

Payload Version

2.12.1

Adapters and Plugins

db-postgres 0.7.1

Augigauki avatar Apr 05 '24 12:04 Augigauki

Still an issue in Payload 2.14.2 with [email protected]

Augigauki avatar May 03 '24 10:05 Augigauki

@Augigauki I'm also facing this issue

kevmiota avatar Jun 18 '24 16:06 kevmiota

This is still an issue in my project.

Updated to v.2.29.0 just now, since I saw this promising bugfix:

db-postgres: localized items in arrays with versions #8334 , but the issue is still occuring.

Same reproducible steps as before. Hoping for a fix, because we are moving to using more generalized blocks (for various cards sections for instance), so a page can be expected to have multiple blocks of the type Cards, with each block having it's own array of cards.

Augigauki avatar Sep 26 '24 14:09 Augigauki

I forgot to update the db-postgres package, it was still on 0.8.2 - updated to @latest (0.8.7) and now saving works fine :)

Augigauki avatar Sep 26 '24 14:09 Augigauki

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

github-actions[bot] avatar Sep 28 '24 04:09 github-actions[bot]