Support » Plugin: CBX Bookmark » Can not delete bookmark post

  • Resolved Tommy

    (@tompradana)


    Hi,

    I found this bug, i tried to delete some post on my bookmark list, post deleted but when i refresh the page, the post still show up.

    Here your code on cbxwpbookmark-public.js

    var $objectid = $postdelete.data("id");
    
    var data = {
        'action': 'cbx_delete_bookmark_post',
        'security': cbxwpbookmark.nonce,
        'postid': $objectid
    };

    $objectid is undefined, because of this:

    <a class="cbxbookmark-delete-btn cbxbookmark-post-delete" href="#" data-object_id="33" data-object_type="story"><span></span></a>

    It should be:

    var $objectid = $postdelete.data("object_id");

    And also on PHP code, i found these lines:

    $object_id = intval($_POST['object_id']);

    And var data should be:

    var data = {
        'action': 'cbx_delete_bookmark_post',
        'security': cbxwpbookmark.nonce,
        'object_id': $objectid
    };

    Thank you for your awesome plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sabuj Kundu

    (@manchumahara)

    Thank you for your note for the bug, I think we messed this up in last release while refactoring variable name to more practical. I just pushed v1.3.0 please check. I will wait for your feedback.

    Plugin Author Sabuj Kundu

    (@manchumahara)

    Closing this topic, we believe this is resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can not delete bookmark post’ is closed to new replies.