Cloned group copies previous 'image_advanced'

Support MB Group Cloned group copies previous 'image_advanced'Resolved

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #14991
    PascalPascal
    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',
            ),
          ),
    
        ),
    
      ),
    );

    #15012
    Anh TranAnh 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
    PascalPascal
    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 TranAnh Tran
    Keymaster

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

    #15045
    ChicharitoChicharito
    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 TranAnh Tran
    Keymaster

    Can you send me an admin account to check that?

    #15074
    KIM TAE YOUNGKIM TAE YOUNG
    Participant

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

    #15077
    Anh TranAnh Tran
    Keymaster

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

    #15085
    KIM TAE YOUNGKIM TAE YOUNG
    Participant

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

    #15118
    ChicharitoChicharito
    Participant

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

    #15121
    Anh TranAnh 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.

    #15128
    KIM TAE YOUNGKIM TAE YOUNG
    Participant

    It works very well.
    Quick fix Thank you very much!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.