-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Is your enhancement related to a problem? Please describe.
The podcast block currently fails to render properly on the front-end when audio files are self-hosted and inserted via the "Insert from URL" option. This appears to be due to a null attachment_id being returned for audio files not in the Media Library.
Steps to Reproduce:
- Use the Podcast block to add an audio file.
- Insert an audio file URL manually via "Insert from URL" (bypassing the Media Library).
- Observe that the block does not render on the front-end.
Expected Behavior:
The Podcast block should gracefully handle audio files inserted via "Insert from URL," even when they are not part of the Media Library.
Actual Behavior:
The block fails to render on the front-end, likely due to the conditional check here:
https://github.com/10up/simple-podcasting/blob/develop/includes/blocks/podcast/markup.php#L29C1-L31C2
Additional Context:
- This issue was noticed when transitioning from Offload Media Lite (S3) to a self-hosted setup for MP3s.
- It seems the block is heavily reliant on Media Library metadata, which isn’t available for files inserted via URL.
Suggested Improvement:
Explore ways to make the block more agnostic to file sources. For instance:
- Allow rendering based solely on the provided URL without requiring an attachment_id.
- Improve conditional handling for cases where the attachment_id is null.
Additional Questions:
- Is there a particular reason the block relies on attachment_id?
- Are there specific metadata fields that could be optional or dynamically fetched for self-hosted files?
Designs
No response
Describe alternatives you've considered
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Projects
Status