• Resolved jbassino

    (@jbassino)


    The new meta delete feature works but in front-end doesn’t show any confirmation after deletion. Only after you refresh the page the meta field is removed.

    Also, there’s the following error at the console after deleting:

    Screenshot – Firefox

    Screenshot – Chrome

    WP 5.8.2

    Browser: Firefox & Chrome

    • This topic was modified 2 years, 9 months ago by jbassino.
    • This topic was modified 2 years, 9 months ago by jbassino.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author JS Morisset

    (@jsmoriss)

    Each table row has an id value like id=”jsmspm-1-meta_name” which, after successful deletion via ajax, is passed back to jQuery, which then does:

    jQuery( '#' + table_row_id ).hide();

    It’s a pretty standard selector, so I’m not sure how that could fail.

    https://api.jquery.com/id-selector/

    It does seem like there might be an extra space in your error?

    That would be odd since there is no space in the value returned by PHP:

    $table_row_id = sanitize_key( $metabox_id . '-' . $obj_id . '-' . $meta_key );
    
    die( $table_row_id );

    js.

    Plugin Author JS Morisset

    (@jsmoriss)

    Further testing suggests that you have a plugin or theme corrupting the output of ajax calls with a newline character. You should find the plugin or theme doing that and get it fixed, otherwise any process using an ajax call on your site can fail, depending how it uses that ajax output.

    js.

    Thread Starter jbassino

    (@jbassino)

    Thanks for your input JS. I’ll debug it.

    Best.

    Thread Starter jbassino

    (@jbassino)

    Thanks for adding the Trim on the update. I actually couldn’t find what was causing it.

    Plugin Author JS Morisset

    (@jsmoriss)

    No problem. Don’t forget to leave a review. 😉

    js.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Deleting meta bug – console error’ is closed to new replies.