Skip to content

Prevent unnecessary API 404 errors#494

Merged
galbus merged 2 commits intomainfrom
s-7904-el-libero-404-not-found-errors-weve-supplied-rest-api
Feb 28, 2026
Merged

Prevent unnecessary API 404 errors#494
galbus merged 2 commits intomainfrom
s-7904-el-libero-404-not-found-errors-weve-supplied-rest-api

Conversation

@galbus
Copy link
Copy Markdown
Contributor

@galbus galbus commented Feb 28, 2026

The onTrashPost() and onDeletePost() hooks had no guard, so they fired for every post type. For revisions/sitemaps/auto-drafts that have no BeyondWords content, deleteAudio() fell back to using the WordPress post ID as the content ID — which doesn't exist in the BeyondWords API, and 404d.

Fix:

hasContent() guard on onTrashPost() / onDeletePost() now skips posts without BeyondWords content.

@linear
Copy link
Copy Markdown

linear bot commented Feb 28, 2026

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 28, 2026

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@galbus galbus merged commit 7b26f56 into main Feb 28, 2026
11 checks passed
@galbus galbus deleted the s-7904-el-libero-404-not-found-errors-weve-supplied-rest-api branch February 28, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants