• Resolved gesser0102

    (@gesser0102)


    I’m having problems with the SVG Support plugin and pages containing the ACF Plugin.

    Whenever I try to make a change to the page, clicking on update returns the error “Updating Failed”

    {“code”:”rest_meta_database_error”,”message”:”Could not update the meta value of inline_featured_image in database.”,”data”:{“key”:”inline_featured_image”,”status”:500}

    Has anyone experienced this problem and been able to resolve it?

    • This topic was modified 8 months, 3 weeks ago by gesser0102.
Viewing 15 replies - 1 through 15 (of 19 total)
  • Same here, subscribing to the issue.

    I have the same issue. ACF Pro downgrade 6.2.7 -> 6.2.5 fixed it, but I need a long term fix

    Thread Starter gesser0102

    (@gesser0102)

    Hi guys,

    I managed to solve this problem by replacing SVG Support with Safe SVG, everything is working normally

    Can confirm – replacing with Safe SVG actually solved the issue, no additional action was required.

    Same problem. Can you test this please? I had to disable this plugin to be able to update ACF fields.

    • This reply was modified 6 months, 3 weeks ago by a4jp.

    I am also having this problem. Looks like not much activity in this thread so I’ll likely have to go with a different plugin as well.

    I am also having this problem.

    shanemac10

    (@shanemac10)

    I think I found the bug. It looks like this plugin calls update_post_meta, even if there had been no change. WordPress seems to have a bug where it returns false if there was an error OR if the value was the same and therefore not updated, and the AJAX function WP_REST_Meta_Fields::update_meta_value that calls the update_metadata function that treats any false as an error, and then throws an actual error as a result. This “Safe SVG” plugin should update to check if there is a difference in meta value before calling the update_post_meta, so to not trigger the WordPress bug.


    /**
     * Save featured image meta data when saved
     */
    
    function bodhi_svgs_save_featured_image_meta( $post_id, $post, $update ) {
    
    	// if gutenberg is active, disable the classic editor checkbox
    	if( isset($_REQUEST['hidden_post_status']) ){
    
    		$value = 0;
    		if ( isset( $_REQUEST['inline_featured_image'] ) ) {
    			$value = 1;
    		}
    
    		// Check if post type supports 'thumbnail' (Featured Image)
    		if ( post_type_supports( get_post_type( $post_id ), 'thumbnail' ) ) {
    
    			// set meta value to either 1 or 0
    			update_post_meta( $post_id, 'inline_featured_image', $value );
                            // ^^^ I believe this is the culprit
    
    		}
    
    	}
    
    }
    
    
    add_action( 'save_post', 'bodhi_svgs_save_featured_image_meta', 10, 3 );
    • This reply was modified 6 months ago by shanemac10.

    We’ve also started experiencing this issue, ACF versions 6.3.1 through to 6.3.1.2, SVG Support 2.5 through to 2.5.5. Oddly we don’t see it on every site instance. Disabling SVG Support resolves the issue.

    Should we expect the SVG Support plugin to be updated? We are moving to Safe SVG as a temporary solution for impacted sites.

    We are now having this issue on ACF Pro 6.3.1 and SVG Support 2.5.5. We have had to disable for now. Any insight as to when SVG Support will have a fix?

    Love the simplicity of the SVG Support plugin. Unfortunately, having the same issue running later versions of ACF in tandem with SVG Support. Removed SVG Support and using Safe SVG in the interim until a patch can be made.

    Plugin Author Benbodhi

    (@benbodhi)

    Hi everyone,

    Apologies for the insane delay and this issue not being addressed sooner!

    I’m back now and going through as much as I can as quickly as I can and will have a fix for this asap.

    @benbodhi Thank you! Updating to version 2.5.7 of the plugin has the resolved the issue for me.

    Plugin Author Benbodhi

    (@benbodhi)

    I believe this issue should be resolved in the recent updates.
    I’ll mark as resolved for now. But please do let me know if there’s still any issues.

    2.5.8 does it again ??

Viewing 15 replies - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.