Podlove Podcast Publisher
[resolved] Bug in episode slug (6 posts)

  1. benallfree
    Posted 2 years ago #

    There is a Podlove episode slug bug that prevents the use of the WP media uploads as episode assets.

    Steps to reproduce:

    1. Set podlove base URL to http://mysite.com/wp-content/uploads/sites/4/ (or whatever)
    2. Upload a media file and note it's File URL, such as path, such as http://mysite.com/wp-content/uploads/sites/4/2013/06/003/mp3
    3. Create an episode. Input the slug, i.e. 2013/06/003
    4. Click the 'MP3' asset type. Podlove will verify that the media exists. Success.
    5. Publish the episode and browse to it.
    6. Observe that Podlove has converted the episode slug to 2013-06-03.mp3, removing the slashes.
    7. Confirm this from the main Podlove dashboard. The podlove dashboard says the episode assets are not found, but the podlove episode editor says that they are found.

    To me, the correct fix is to not convert / into -. Otherwise there is no way to use the media folder to host episodes.


  2. benallfree
    Posted 2 years ago #

    This appears to be coming from slugify(), which makes sense.

    So perhaps the bug is that the episode slug that is input in the podlove editor is not slugify'd before being validated.

    But it still begs the question: if / is not allowed in a slug, how can we point to media files uploaded using the WP admin? Unless we disable yearmonth.

  3. benallfree
    Posted 2 years ago #

    Here is one solution:

    1. Set the Podlove base url to http://yoursite.com/wp-content/uploads/sites/X/ (where X is your site ID for multisite).

    2. Add a custom mod_rewrite rule in .htaccess:

    RewriteRule ^([_0-9a-zA-Z-]+/)?wp/uploads/sites/(\d+)/(\d+)-(\d+)-(.*) $1/wp-content/uploads/sites/$2/$3/$4/$5 [L]


    There is also a way to add this to .htaccess on plugin install with the mod_rewrite_rules filter, but I don't know how that is triggered.

    Anyway, this would fix the problem of File URL with year/month formatting.

  4. Eric Teubert
    Plugin Author

    Posted 2 years ago #

    Hi benallfree,

    This is more of an interface bug. It is by intention that the slug does not accept slashes. By design, it is a file slug and should not contain directories. Admittedly, this is not communicated at all at the moment.

    The recommended way to host media files is to upload them via FTP or sFTP, not the WordPress uploader. That way they can all be in the same directory, which is much more clean and organized.

    We will definitely try to make this more obvious.

  5. benallfree
    Posted 2 years ago #

    Hi, thanks for the reply :)

    I believe I have solved my issue with the .htaccess modification, at least temporarily.

    My use case is that assistants doing my uploading for me. I would prefer not to give them FTP access. Maybe it is worth considering some type of accommodation for using the WP media uploader?

    Two approaches I can see...

    Approach #1: Instead of specifying a slug, allow attachments to be associated with the custom post type.

    Approach #2 (the one I prefer): Support multiple slug 'segments' separated by / (or some other delimiter).

    Example base URL: http://yoursite.com/wp-content/uploads/sites/4/%1/%2/%3
    Example multi-segment slug: 2013/06/003
    Would map to: http://yoursite.com/wp-content/uploads/sites/4/2013/06/003.mp3

  6. Eric Teubert
    Plugin Author

    Posted 2 years ago #

    Thanks for your suggestions,

    you are not the first one to ask for "WP Upload" support. We will consider it at some point when we have a great solution. Maybe something like a customized uploader in the episode page which uploads the file and automatically fills in the slug correctly. We will think of something :)

    Again, thanks for your feedback!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Podlove Podcast Publisher
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.