• Hi,
    When we save a post from quick edit e.g changing the menu order
    the post_meta _easy_image_gallery_v2 is also deleted.

    If anyone has a patch till a fix is published please share.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, we reproduced the problem and will try to fix very quickly. We will update you here when we are ready.

    Thanks for the report.

    Greetings,
    Stoyan from DevriX.

    Hello, we patched the problem, and it’s fixed in our next version.

    You can temporarily solve the problem by removing, rows 374, 373 or replace the easy_image_gallery_save_post function with the updated one.

    The file is: easy-image-gallery/includes/metabox.php

    /**
     * Save function
     *
     * @since 1.0
     */
    function easy_image_gallery_save_post( $post_id ) {
    
        if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
            return;
    
        $post_types = easy_image_gallery_allowed_post_types();
    
        // check user permissions
        if ( isset( $_POST[ 'post_type' ] ) && !array_key_exists( $_POST[ 'post_type' ], $post_types ) ) {
            if ( !current_user_can( 'edit_page', $post_id ) )
                return;
        }
        else {
            if ( !current_user_can( 'edit_post', $post_id ) )
                return;
        }
    
        if ( isset($_POST['image_gallery']) && !empty($_POST['image_gallery']) ){
            $galleries = array();
            foreach ($_POST['image_gallery'] as $gallery){
                if ($gallery['DATA'] != null){
                    $convert_to_arr = explode(',', $gallery['DATA']);
                }else{
                    $convert_to_arr = null;
                }
    
                if( !isset( $gallery['OPEN_IMAGES'] ) ){
                    $gallery['OPEN_IMAGES'] = 'off';
                }
    
                $gallery['DATA'] = $convert_to_arr;
                $galleries[] = $gallery;
            }
    
            update_post_meta( $post_id, '_easy_image_gallery_v2', $galleries );
            delete_post_meta( $post_id, '_easy_image_gallery' );
        }
    
        // link to larger images
        if ( isset( $_POST[ 'easy_image_gallery_link_images' ] ) )
            update_post_meta( $post_id, '_easy_image_gallery_link_images', $_POST[ 'easy_image_gallery_link_images' ] );
        else
            update_post_meta( $post_id, '_easy_image_gallery_link_images', 'off' );
    
        do_action( 'easy_image_gallery_save_post', $post_id );
    }

    If you have any other problems or questions, we are ready to answer. Thanks for using our plugins.

    Stoyan from DevriX.

    Unbelievable, I did a quick edit on most of my pages and all galleries gone.
    Then, started to search what could be the problem…. and found this!
    This issue has reported 5 months ago, and not updated already.
    Unbelievable. I lost hours of work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘image gallery deleted on quick edit save’ is closed to new replies.