Jump to content
bracketfire

How to prevent a page from being fetched via API while it's deleting?

Recommended Posts

Occasionally we see an error which leads me to believe the site is trying to serve a page while (due to asynchronous background cron) it's being deleted.  This particular page has around 100 fields, so page delete is foreach-ing across the fields.  Site is on innodb.   Has anyone ever wrapped delete in a transaction or anything to guard against this?

Share this post


Link to post
Share on other sites
25 minutes ago, bracketfire said:

Has anyone ever wrapped delete in a transaction or anything to guard against this?

No, but have you tried to set the page status to be unpublished, save it, then delete it?

  • Like 2

Share this post


Link to post
Share on other sites

This is a great idea, we don't really use the publish/unpublished thing for these pages, but maybe a solution right under me nose 🙂  Thanks!

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...