Skip Navigation

[Resolved] Custom Post delete link do not delete post – returns Security check

This thread is resolved. Here is a description of the problem and solution.

Problem:
The issue here was that the user's delete post link was not working.

Solution:
Naturally the first thing to do when something isn't working is to do a very basic debug by disabling all the non-toolset plugins and switching to a default theme and try again.

In this user's case the issue was being caused by the theme.

This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Author
Posts
#594225

Hello
So I have folowing data structure
Custom Post types: Teams and Persons.
Due to some circumstances, the relation is made as Teams has repeated field PersonID and Persons has a field ID.

I have installed access plugin and setup following permissions
1) I have custom role TeamManager which is able to edit and delete OWN Persons-posts
2) for Persons post I setup "Delete own" and "Edit own" as well

I use a view with CRED link to CRED edit form (which works OK) and CRED Delete link.
CRED delete link wont work. As I see trough network monitoring it went to some
/admin-ajax.php?action=...
which returns
Security check

The Person posts belongs (author) to the logged user

Tried to allow TeamManager to delete any posts - wont help

Theme is "Intentionaly blank".

Help needed
Thank you

P.S. No confirmation message box appears, BTW.

#594381

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Maksim,

Thank you for contacting our support forum.

I'm not understanding the issue clearly here. Is it that when you click the delete link nothing happens?

Please let me know.
Thanks,
Shane

#594569

Hello
Yes. Nothing hapeened - the post is not deleted, the page is same and no any warning messagebox, like "Are you sure that you like to delete the post?" show.
Just nothing
Using browser developer tools I can see request to url: /wp-admin/admin-ajax.php, which returns
"Security check"
That it

#594603

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Maksim,

Thank you for confirming.

I'm not able to replicate the issue on my end but could you provide me with admin access to the website so that I can have a further look at this for you ?

The private fields will be enabled for your next response.

Thanks,
Shane

#594682

Hello
That was an theme uncompatible problem.
Fixed
Sorry for bothering
Thank you