equalizedigital / accessibility-checker

GNU General Public License v2.0
14 stars 8 forks source link

Short-circuit edac_save_post() when post_status is trash #536

Closed pattonwebz closed 5 months ago

pattonwebz commented 5 months ago

This is a first pass at a solution for #535 . It returns from the save method when the post is trashed to avoid it, resulting in request errors later in the chain.

Bailing early here ensures that the rest of the flow runs and the data is purged.

There may be a better solution to this, but I haven't found anything as simple as this. I will continue to think and find something more robust if I can.

Resolves: #535

pattonwebz commented 5 months ago

This fixes the error log output, but I still see a momentary error from the API call.

Screenshot 2024-03-18 at 10 39 43 AM

I did not see this on my test site, but it appeared after installing Yoast SEO and remains even after disabling Accessibility-Checker. Do you have Yoast SEO installed on your test site?

I can reproduce it on a fresh test site with just Yoast SEO installed. I opened an issue on their repo, but I am confident this issue does not come from Accessibility Checker.