Custom Fields
Re-Envisioned
Support Meta Box Group Cloned group copies previous 'image_advanced'

This topic contains 11 replies, has 4 voices, and was last updated by  KIM TAE YOUNG 3 weeks ago.

  • Creator
    Topic
  • #14991
    Resolved
    Pascal
    Participant

    I saw a similar problem in a previous topic, but it wasn’t quite the same.

    When I create an ‘image_advanced’ field within a group, then save it, then add a new group, the ‘image_advanced’ field gets copied over. The images can be deleted and saved without problems. But they only appear again on a newly added group.

    $meta_boxes[] = array(
      'id' => 'example_metabox',
      'title' => 'Example',
      'post_types' => array('page'),
      'context' => 'advanced',
      'priority' => 'high',
      'autosave' => 'false',
      'fields' => array(
        
        array(
          'id' => '_images_example',
          'type' => 'group',
          'default_state' => 'expanded',
          'collapsible' => true,
          'save_state' => true,
          'clone' => true,
          'sort_clone' => true,
    
          'fields' => array(
            array(
              'id' => '_images',
              'type' => 'image_advanced',
              'name' => 'Images',
            ),
          ),
    
        ),
    
      ),
    );

Viewing 10 replies - 1 through 10 (of 11 total)
  • Author
    Replies
  • #15012

    Anh Tran
    Keymaster

    Hi Pascal,

    I’ve just tested with your code and don’t see the problem. Do you see any error in the dev console?

    #15018

    Pascal
    Participant

    Hmm strange, I just tested the same thing in a fresh install and there it works as intended!

    I do not see any errors in the dev console. I also tried to disable all plugins, including WPML which I thought that may cause issues, but it wasn’t that either.

    So I can’t exactly tell what causes the problem, but as it works on a fresh install, the problem will probably lie somewhere within the theme.

    The only thing that may help identify the problem is, that it does only take the images from the latest added group. So if I would have added 10 groups with images and I add the 11th, it will use the images from the 10th group.

    I will try to do more testing, but the plugin doesn’t seem to be the problem at least!

    #15021

    Anh Tran
    Keymaster

    Glad that it works now. Let me know if you find anything!

    #15045

    Play us Design
    Participant

    This is happening on one of my installations too.
    Last image copies to the new cloned field.
    The console doesn’t show any error.

    #15047

    Anh Tran
    Keymaster

    Can you send me an admin account to check that?

    #15074

    KIM TAE YOUNG
    Participant

    Has not it been solved yet?
    I have the same problem.

    #15077

    Anh Tran
    Keymaster

    Hi Kim, please send me a temporary admin account to check?

    #15085

    KIM TAE YOUNG
    Participant

    Hi, Anh.
    Temporary manager account information was sent via “Contact”.
    please check.

    #15118

    Play us Design
    Participant

    The project is in my local environment. I hope that you can work with Kim’s

    #15121

    Anh Tran
    Keymaster

    Hey guys, I’ve just found the bug and fixed it here:

    https://github.com/wpmetabox/meta-box/commit/03df0e3e52ff69db981e81fedb62aca31e62c679

    @Kim: I also applied the fix on your website and it works great.

Viewing 10 replies - 1 through 10 (of 11 total)

You must be logged in to reply to this topic.