• Resolved Илья

    (@letraceursnork)


    When I’m trying to add new Related Post, update the current post and then immediately delete newly added relation – it does not deletes, it keeps intact. Though, when I’m refreshing the page – RelatedPost is in its place, but now it can be deleted smoothly.

    I’ve located a bug that causes that behaviour:

    File ./assets/admin/js/scripts.js, line 13:

    html = '<div class="item"><span class="remove"><i class="fas fa-times"></i></span> <span class="move"><i class="fas fa-sort"></i></span> <span class="title">' + post_title + '</span></div><input type="hidden" name="related_post_ids[]" value="' + post_id + '" /></div>';

    There is two closing </div> but only one opening <div>. So, the line should be that:

    html = '<div class="item"><span class="remove"><i class="fas fa-times"></i></span> <span class="move"><i class="fas fa-sort"></i></span> <span class="title">' + post_title + '</span><input type="hidden" name="related_post_ids[]" value="' + post_id + '" /></div>';

    IDK if you have a github, I didn’t found one, so, can you just fix that little thing without me opening PRs?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable to delete newly added Related Post unless page is refreshed’ is closed to new replies.