Description
openedon Jan 18, 2023
Quick summary
User in 5833237-zen reported that, after creating a post via the API, and uploading media, he deleted the media via WP admin. After deletion, the media is still retrievable via Media API.
Steps to reproduce
-
I have created post with id:123 and have uploaded a media to it.
-
In the media API (GET /wp/v2/media/) I will get "post" : 123 (i.e Id of post) which is the media's parent.
-
Then I deleted the media from the post 123 from WordPress UI, but still when I hit the media API
-
I am getting "post" : 123 (i.e Id of post). That means the parent mapping with media which has removed from the post still exist
What you expected to happen
If the attachment is removed from the post, you should not get the id of that post when requesting the attachment.
What actually happened
If the attachment is removed from the post, you do get the id of that post when requesting the attachment.
Context
p3hLNG-1cG-p2
Platform (Simple, Atomic, or both?)
Atomic, Self-hosted
Theme-specific issue?
No response
Browser, operating system and other notes
No response
Reproducibility
Consistent
Severity
None
Available workarounds?
None
Workaround details
No response