Unable to delete CPT and Data in API Query Builder

I’m not able to delete a CPT created via CPT sync. I was able to do this in the first version of the beta without any issue but am having trouble now for some reason? I’ve included a video

Your video shows a very limited viewport – maybe an exporting issue?

But what exactly are you trying to achieve? The button you clicked does only remove the posts created for this CPT. It does not remove the CPT itself. Also, it will not remove the Endpoint.

To remove the CPT itself, you just need to click “No” on “CPT Sync”. Otherwise, the CPT will be created.

To remove the API endpoint itself, you have two ways:

  1. Right click on the endpoint → Delete
  2. Scroll to the bottom on “Actions” → “Delete Endpoint”.

Hope that makes things clear :slight_smile:

I did, try deleting the endpoint, but it keeps reappearing in my list of API endpoints when I refresh.

Turning off the CPT sync did remove it from the menu on the left.

In a different topic, you had issues with cache in the backend. Could this be the same reason? Or, can you see javascript errors in the console when trying to delete the endpoint?

It’s still happening when I open in an incognito window

I was actually thinking much more about server cache. For example, have you activated Lightspeed cache? Try deactivating all performance plugins, check your server to see if there’s any kind of caching happening, and then try again.

Otherwise, as mentioned, it would be helpful to know if there are any JavaScript errors appearing in the console.

Cleared the page and object cache on my server and it’s still there.

Again… do you see any JavaScript errors on the console?

Not seeing any errors. Here a video of the behavior with the console open

You forgot to click to “Save” :wink:

That did it. I thought about that but once you delete the endpoint the yellow selection cursor moves to the next endpoint in the list so it wasn’t clear that clicking save would apply to the deletion. It’s also unclear that clicking “Delete CPT and Data” doesn’t actually delete that data until you hit the save button since there’s no indication that the user should do anything after the deletion confirmation window. Maybe a sentence in that confirmation window would help? I’ll keep this in mind for the future though.

Overall the CPT Sync function is working well for me so far!

“Delete CPT and Data” should nod need a separate Save action. This will automatically be fired :slight_smile: Only adding/removing endpoints needs a save action – as you would add or remove elements in the Bricks Builder. The state is only saved after saving manually :slight_smile:

Thanks very much for your testing work :folded_hands: