Skip to content

Repeatable custom field inside repeatable group don't save properly #1035

Description

@bomsn

I created custom field based on the address field

Expected Behavior:

  • The data need to be saved properly, each field created need to be saved.

Actual Behavior:

  • When adding repeatable custom field, say 3 for example, after save I only find 2.
  • If there are for example 3 fields, and I added 4 other fields, after save, I only find 4 where the total should be 7
  • Sometimes it will save all fields except the last one
  • Saving doesn't work properly in general.

Steps to reproduce (I have confirmed I can reproduce this issue on the trunk branch):

  1. Create New Post
  2. Scroll to Book details metabox,
  3. Create 3 fields (or any other number), give them random names
  4. Update post (you'll see that only first 2 fields were saved)
  5. Now add another 3 fields and update (you'll see that only the first one of them was saved)
  6. If you add another group it will act the same way

I suspect it's javascript bug.

CMB2 Field Registration Code:

https://gist.github.com/bomsn/36174de42bfbaa74abcd5bce1bfc432d

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Sponsor
      SponsoredKunjungi sekarang
      Promo