WordPress.org

Ready to get started?Download WordPress

Forums

Enclosure Custom Field Erasing after Saving Post (50 posts)

  1. Are any plugins active?

    No, I deactivated all of them via the control panel. Should I not have?

    Yes.

    I'll await your reply to the above first. ;-)

    Thank you Esmi!!!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Should I not have?

    No - that's fine. I was just clarifying the current situation.

    Had another thought - have you tried repairing your database? If it's not a plugin causing a problem, maybe the issue is in the db itself.

  3. Had another thought - have you tried repairing your database?

    It had crossed my mind but I haven't tried it yet. Will back up now and try it and report back!

  4. Database repair did not change anything, sadly.

  5. Just renamed plug-ins folder via FTP to disable it and unfortunately the enclosure is still being erased. Sigh.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Are both the client's site and the test site in sub-folders off a single root? I'd assume that the client's site is set up on the server in a sub-folder that acts as a local root for that domain, yes? What about the test site?

    Have you tried setting up a completely new post in the client's site and seeing if you can get the enclosure field to stick (as opposed to adding the custom field to an existing post)? Try just a line of lorem ipsum for the post content. Ditto for the title.

  7. Are both the client's site and the test site in sub-folders off a single root? I'd assume that the client's site is set up on the server in a sub-folder that acts as a local root for that domain, yes? What about the test site?

    Client's site is at: http://clientname.mydevserver.com

    Live site is at: http://www.clientname.com

    Both installs are in a sub-folder off the root.

    Have you tried setting up a completely new post in the client's site and seeing if you can get the enclosure field to stick (as opposed to adding the custom field to an existing post)? Try just a line of lorem ipsum for the post content. Ditto for the title.

    Yes, sadly. Have tried adding brand new, fresh post, adding fresh enclosure custom field to it, and enclosure is erased.

    I forget if I mentioned this before, but older posts that I spot-checked (from the last several years) are still fine - it's only the most recent few posts plus brand-new posts that are going wonky.

  8. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    How recent are these wonky posts? What changed around that time? In WordPress or on the server itself?

  9. The wonky posts are from the last few weeks.

    Only changes, on both installations (test & live):

    - WordPress update to 3.3.1
    - plug-in updates

    No changes on the server at all.

  10. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Maybe we should get some extra eyes on this. Give me a few minutes...

  11. Andrew Nacin
    Lead Developer
    Posted 2 years ago #

    esmi reached out to me on this one. As she suspected, the issue is Trac ticket #10511, which in turn was caused by changes made in ticket #6840.

    I am speaking from almost no experience on the matter. I am not a podcaster, have never been a podcaster; have never used actively used enclosures on a WordPress site; have no idea what the spec says, or knowledge of whether there is a spec at all; and had probably not yet even heard of WordPress at the time enclosures, pings, etc. were developed for core.

    That said:

    It appears enclosure fields should never be managed through the interface. WordPress loops through a post, gathers up all of the links, and checks each one to see if it is an audio or video file. If so, it manually adds the enclosure field, which consists of a URL, followed by the content length, followed by the mime type.

    On every post update, enclosures are updated. (This essentially occurs when WordPress sends pings. It actually happens on cron, which is why it may take a few moments and possibly a page refresh to notice they are gone.)

    If an item for enclosure is no longer linked in the body of the post, the enclosure is removed from the database. If the item for enclosure was never linked in the body of the post, a manually added enclosure will be removed.

    And there is your problem.

    I really don't know if manually adding enclosure fields to links that do not exist is an abuse of enclosures, or whether it should work and our change in #6840 was bad. I do not know how other podcasters or plugins manage enclosures. I do know that the ping and enclosure routines are some of the oldest code in WordPress, so this may take a while.

    I will dig into this a bit more and see what I can find out.

  12. Hi Andrew - thanks so much for chiming in, and thanks Esmi for sounding the alarm.

    I want to clarify a couple of things.

    In all cases on my client's site, the identical enclosure URL is included in the body of the post.

    In other words, within the body of the post there's a line that says:

    Listen to my interview with so-and-so.

    ...and the MP3 audio files is linked.

    Up until a few months ago, the process of adding that line alone automatically added the enclosure custom field, just as you describe.

    A few months back, however, that process suddenly stopped working - in other words, adding the link to the MP3 in the body of the post was no longer automatically adding the MP3 URL as an enclosure.

    At the time I attributed it to the WP Audio plug-in we were using, assuming that perhaps it was no longer fully compatible with whatever version of WordPress we were then up to - perhaps 3.2.

    As a workaround, since the plug-in had been abandoned by the developer, I had my client start adding the enclosure custom fields manually. This was an extra step for her, but it worked perfectly fine... until recently.

    Note that all this time, the MP3 audio URL has always been contained in the body of the post.

    Thank you so much for looking into this and I hope this helps clarify what's going on in my client's case.

  13. Andrew Nacin
    Lead Developer
    Posted 2 years ago #

    Can I have a link to a few of these mp3 audio URLs, as they exist live? If you don't want to post them, you can email them to me at my last name at wordpress.org. (We'll continue the support here, though.)

  14. Andrew Nacin
    Lead Developer
    Posted 2 years ago #

    Also, a link to a post that contains one or more of these same URLs.

  15. Absolutely, I'll email you now. Thanks so much.

  16. Angelo Mandato
    Member
    Posted 2 years ago #

    Install Blubrry PowerPress, it re-enables the Pre WP 2.8 behavior when enclosure in the custom fields weren't deleted. Plus if you're podcasting, you definitely want a podcasting plugin to better harness all the things you can and should be doing with your podcast.

    I've reported this issue, spoke about it with WP developers at different WordPress events and have been directed to contact 3 different people at Automattic and never received any responses. Andrew, if you're the person to speak with, please email me at cio [at] rawvoice.com. Thanks!

  17. Andrew Nacin
    Lead Developer
    Posted 2 years ago #

    A cursory test of the URLs sent shows that https URLs do not work.

    That this was the case was fairly obvious when I examined the regular expression: preg_match_all( "{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp );

  18. Wow - if that's the culprit it would be amazing. I'm pretty sure I'd tested that aspect earlier in a few different ways but will absolutely do so again and report back. (And I'll also inquire with my client as to when/why they started using those secure Amazon links.)

    Thanks again for having a look.

  19. Unbelievable. The new https links that my client is using for the MP3 URLs do seem to be the culprit after all on the live site.

    Over on the live server, I changed both the link within the post and the enclosure to the old http format, and lo and behold - the enclosure is not erased! Thank you so much for helping figure out the issue. I'm not sure why my client started using the secure links but I'll find out.

    Two more mysteries remain, much less critical:

    1) On the test site (same server, same WP version, same theme, same plug-ins) I had previously done a test, which I just repeated, to add a new post with the identical content as one of the problematic ones on the live server that had the https links. During those tests, the enclosure was never erased on save, which is why I had ruled out the secure links as the issue earlier.

    2) Any idea why the more recent versions of WP (perhaps since 3.2) no longer automatically pull the MP3 URL from the body of the post automatically and put it in the enclosure field? It's an extra step to have to paste it in manually, though certainly not a huge deal. It was handy for my client, though, and wondering if this functionality might be returned.

    Thank you SO much Andrew!

  20. Angelo Mandato
    Member
    Posted 2 years ago #

    Just a heads up, hosting media for a podcast on HTTPS is problematic. There are podcatcher apps that cannot download via HTTPS since they don't have the SSL library compiled into them. Also, the overhead HTTPS adds can lead to files taking longer to download than they would otherwise take, which is a big deal if your trying to distribute videos in H.264 format optimized for the web, though not as much a big deal if you're distributing audio.

    Whether you use a podcasting plugin such as PowerPress or not is your decision, but if you were using PowerPress you would have received warnings cautioning you of using https. We spent 6 years figuring out what works and what doesn't, you're essentially getting our expertise when you use our plugin.

Topic Closed

This topic has been closed to new replies.

About this Topic