Support » Plugin: Meta Box » Clone Field Issue

  • I’m noticing what seems to be a bug in Meta Box 4.2 on cloned fields.

    Here’s how it works:
    1) Added a couple cloned fields. Saved.
    2) Deleted all the cloned fields and emptied out the final box. Saved.
    3) Added info back to the field (either in the one box or multiples). Saved.

    rwmb_meta() now returns data with the array starting on 1 instead of 0.

    So, I have an array test that goes something like:

    if (! empty($ticket_array[0])) {
      do stuff
    } else {
      echo "There is nothing";

    This will return, “There is nothing” because array[0] will always be empty after the previous steps. Works normally if you haven’t deleted the fields previously.

    Any fix for this or am I crazy? I could code around it be I’d rather a fix on the plugin end.


Viewing 1 replies (of 1 total)
  • BTW. I notice the array can start beyond the 1st index as I have one field that is starting at index 3. Is this related to the DB fields? They aren’t fully deleting in some cases?

    My temporary work around was to re-index the array with array_merge.

Viewing 1 replies (of 1 total)
  • The topic ‘Clone Field Issue’ is closed to new replies.