Custom Fields
Re-Envisioned
Support General Cloned field always generates 12 new cloned fields

This topic contains 7 replies, has 2 voices, and was last updated by  thomassultana 10 months, 4 weeks ago.

  • Creator
    Topic
  • #11366
    Resolved
    thomassultana
    Participant

    When i try to clear out all values in a cloneable field and hit save, it always generated another 12 automatically. How can i prevent this?

    [url=https://ibb.co/fAHNuz][img]https://thumb.ibb.co/fAHNuz/Screen_Shot_2018_09_17_at_14_37_17.png[/img][/url]

    Any idea what can be going wrong?

    Im using Metabox 4.15.5.

    This is the meta value data that gets stored each time in the database:

    a:12:{i:0;s:5:"Array";i:1;s:5:"Array";i:2;s:5:"Array";i:3;s:5:"Array";i:4;s:5:"Array";i:5;s:5:"Array";i:6;s:5:"Array";i:7;s:5:"Array";i:8;s:5:"Array";i:9;s:5:"Array";i:10;s:5:"Array";i:11;s:5:"Array";}

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #11801

    thomassultana
    Participant

    Hi this is still happening. Im a paying customer where is the support?

    #11802

    Anh Tran
    Keymaster

    Hi Thomas,

    Sorry for not reply the topic. I don’t know why I missed this. Can you please tell me what field type it is? And please post your code here so I can debug and fix it faster.

    Thanks for understanding.
    Anh

    #11805

    thomassultana
    Participant

    Thats ok, i got worried that support disappeared. Im using latest version of meta box. I have the following extensions as well, fully updated:

    term meta
    include exclude
    columns

    Code is below:

    $meta_boxes[] = array(
        'id' => 'restriction_targeting',
        'title'      => esc_html__( 'Targeting', 'your-prefix' ),
        'post_types' => array( 'restrictions' ),
        // List of meta fields
        'fields'     => array(
            array(
                'name'       => esc_html__( 'Categories', 'your-prefix' ),
                'id'         => $prefix . 'categories',
                'type'       => 'taxonomy_advanced',
                'taxonomy'   => 'product_cat',
                'clone'        => true,
                'field_type' => 'select_tree',
                'query_args' => array(),
            ),
        )
    );
    #11810

    Anh Tran
    Keymaster

    Hi Thomas, I could replicate the bug. Looks like the clone doesn’t work well with select_tree. I’ll check and fix it.

    #11811

    thomassultana
    Participant

    Ok thank you Anh Tran!

    #11884

    Anh Tran
    Keymaster

    Hi Thomas, we’ve fixed the bug on Github. Can you please try it?

    #12075

    thomassultana
    Participant

    Hey Anh

    Sorry for the late reply. I’ve managed to get it to work now. Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.