Skip Navigation

[Waiting for user confirmation] cannot delete relationship. critical error: Toolset_Element_Exception_Element_Do

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 23 replies, has 1 voice.

Last updated by Minesh 14 hours, 51 minutes ago.

Assisted by: Minesh.

Author
Posts
#2853172
Screenshot 2026-03-23 at 07.57.53.png

Hi there

This has suddenly started occurring. Presumably with a recent update?

I have two posts called Resource and Profile with an infinite relationship (many different resources can belong to many different profiles).

On either parent post I have a view displaying the related intermediary post.

Inside that view loop I have a link to delete the relationship:

[cred-delete-post action='delete' onsuccess='self']DELETE LABEL HERE[/cred-delete-post]

When a user, any user including admin, clicks the link to delete the relationship the current parent post crashes with a critical error - see screenshot attached.

The other parent post in the relationship displays as normal.

The relationship post is deleted.

Hoping you know what this is and can help me resolve it. I have never seen it happen in 13yrs using Toolset...

Thanks in advance!

Rita

#2853180

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL where I can see the delete relationship link you added.

Also, please add 10-15 dummy posts that I can use to test the delete relationship funtion.

#2853184
Screenshot 2026-03-23 at 09.17.02.png

Hi Minesh

Thanks for coming back so quickly. This feels urgent.

I have created 10 dummy 'resource' posts for you. I have tagged a profile (my profile) to each one so you don't have to do that unless you want to. In my tests the author and/or user role didn't matter so here we have 10 x Resource posts created by Toolset Support (administrator) with an intermediary post linking the Profile post created by Rita Horne (administrator) to each one. You will see the related profile displayed at the bottom of the body text and author with the delete link "Untag Rita M Horne":
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link
hidden link

The Resource posts are listed in the front-end 'Library' directory or in the Dashboard under Resources:
hidden link
hidden link

I have also set the 'Profile-Resource' intermediary post to be listed in the dashboard menu so you can easily access it:
hidden link

The content template for the 'resource' post where the view to display the relationship is placed. Search for 'profile-parents-for-resource-collaborated' to find it:
hidden link

The above mentioned view called 'profile-parents-for-resource-collaborated' where the delete shortcode is placed:
hidden link

Standing by!

Rita

#2853200

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I can see the error when i try to delete the post but this is strange. No other user reported same issue recently or before.

- Have you changed anything with the post relationship?
- your goal is to disconnect the intermediary post - correct?

It seems the site you shared is production site and I can not troubleshoot on that. I need a test site that should be 1:1 copy of your current site and then I will try to investigate this further.

#2853232

Hi Minesh
Yes its very odd. In 13yrs building with Toolset I have never seen it either.
It feels like the site thinks there is something in the database that doesn't exist.
I haven't changed anything around post relationships and have this same setup on other sites.
Will create a duplicate site you can test with.
Coming back to you.
Rita

#2853413

Hi Minesh
I have created a duplicate site for you to test.
Please provide a private reply to send you the info?
Rita

#2853684

Christopher Amirian
Supporter

Languages: English (English )

Hi Rita,

Please check the private checkbox for the next reply to provide the login information for the copy/staging version of the website.

Thanks.

#2854222

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see two delete links on the following page: hidden link
- Just to double check with you I should check against "Delete this resource" or "Delete this intermediary post (Untag)"?

#2854230

'Delete this resource' deletes the resource post and its intermediary post if you just want to get rid of it.

'Delete this intermediary post (Untag)' deletes the intermediary post related to that resource post. When you do this and then view that resource post you will see the critical error. The Lorem 02 resource post is currently presenting an example of that error.

I gave you this view just so you could see all the info in one place.

You can also navigate to any one of the resource posts to delete the intermediary post and see the error. The scenario, and therein the issue, is the same on either the view of resources or a resource post itself.

Feel free to create new resource posts, 'tag' them and then delete the tag to see the error.

#2854388

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Minesh is off today, and he will be available tomorrow.

Thanks.

#2854412

Ok. Thank you.

#2854750

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I do not know the site history but when I check the following resource post:
- hidden link

And if you check the section "Profiles Resources" and I do not see any connected posts within this section. Have you imported the post-relationshp or have you made any changes to your post-relationshp?

#2854984

Hi Minesh
I have removed the original resource posts and profile posts because they are private to their members on the production site. I then created new resource posts and linked them to my profile in the Resource Profile relationship. The resource post "Lorem 1" has been deleted by me. The "Lorem 2" resource post had a linked relationship which I had deleted (untagged) so you could quickly see an example of the critical error. If you are logged in as an administrator and try to view that Lorem 2 resource post in the front end you will see that critical error. The other resource posts (Lorem 3 and above) are all there, with linked relationships, for you to test and play with, as you had requested these for testing. To test, simply navigate to any of these test resource posts, either on the post itself or in the view on the '/about' page, and click the 'Delete relationship' (untag) link. I have also given you links to all the views, templates etc and instructions on how to create new resource posts if you run out of test resource posts.
Hope this explains.
Rita

#2855791

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

When I check the functions.php file your your active theme I found that there are multiple "before_delete_post" hooks are added.

Can you please try to comment out those for a moment and then try to delete any of the post you mention and check if that helps?

#2855823

Hi Minesh
I did as you said. That doesn't make any difference in my tests. Nor does changing the 'delete' action to 'trash'. Then the intermediary doesn't cause the error but it isn't going to work in this scenario either. The intermediary post needs to be 'deleted' not just 'trashed'. If trashed, the intermediary post is moved to the bin so the resource post declares there is no related intermediary post on the front end but the user cannot create another intermediary post with the same profile and resource post because it already exists.
Any other ideas? 🙂