• Hi,

    When trying to crop images, I often get a JavaScript Alert error message:

    “Can not update attachment metadata.”

    Can you please shed some light on this issue?

    Thank you,

    Bira

Viewing 4 replies - 1 through 4 (of 4 total)
  • I am getting the same alert too!

    Try the “regenerate the thumbnails” button. Worked for me, but doesn’t quite fix the problem.

    OK so I found a work-around that has yet to fail.

    Open scissors-watermark/functions.php and comment out ln1139 – 1155. So this function is no longer used:

    // Check if exists files of custom sizes. If not we re-create all sizes including custom sizes.
    		if ( !empty( $_wp_additional_image_sizes ) )
    		{
    			$custom_sizes = array_keys( $_wp_additional_image_sizes );
    
    			if ( in_array( $_POST['target'], $custom_sizes ) ):
    				 //	TODO: It re-create all sizes. It should to make only the custom size which miss
    				$attachment_metadata = get_post_meta($post->ID, '_wp_attachment_metadata');
    				$new_metadata = wp_generate_attachment_metadata( $post->ID, $fullfile );
    				if ( !wp_update_attachment_metadata( $post->ID, $new_metadata ) ):
    					return __('Can not update attachment metadata.', 'scissors');
    				endif;
    			endif;
    
    		}

    Whatever this was doing was failing, and since disabling it I have been able to use the plugin like expected.

    Cheers!

    @jamin84: Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Scissors and Watermark] getting error: cannot update metadata’ is closed to new replies.