Support » Plugin: Advanced Contact form 7 DB » Unable to delete rows

  • Resolved vermillionone

    (@vermillionone)


    I’ve updated your plugin on a site I maintain, but once an entry is made, it is not able to be deleted. I’m wondering if you are aware of this issue, and if so, do you happen to have a fix for it? I know the page link I gave doesn’t work, I just wanted to use that as an example of where I am having the problem since that is where the plugin’s admin section is found.

    • This topic was modified 2 months, 3 weeks ago by  vermillionone.
    • This topic was modified 2 months, 3 weeks ago by  vermillionone.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey, I found a fix for it. There was an issue in getting the correct string for the $del_id variable on line 799 of class-advanced-cf7-db-admin.php.

    Here is the broken definition:
    $del_id = implode(',', array_map('intval',sanitize_text_field($_POST['del_id'])));

    Here is the fixed definition:
    ‘$del_id = implode(‘,’, array_map(‘intval’, array_map( ‘sanitize_text_field’, $_POST[‘del_id’])));’

    The issue is that $_POST['del_id] is an array, so sanitize_text_field() is not going to work correctly. Just need to wrap it in array_map() to get it working.

    $del_id = implode(',', array_map('intval', array_map( 'sanitize_text_field', $_POST['del_id'])));

    I confirmed that this works at least on my localhost. Thanks @vermillionone good job!

    @shadtek Glad to help!

    • This reply was modified 2 months, 3 weeks ago by  vermillionone.
    Plugin Author Vsourz Digital

    (@vsourz1td)

    Hello Everyone,

    We have resolved the issue in the latest version provided.

    Kindly upgrade to the latest version of the plugin.

    Regards,
    Vsourz

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