WordPress.org

Support

Support » How-To and Troubleshooting » Enclosure Custom Field Erasing after Saving Post

Enclosure Custom Field Erasing after Saving Post

  • Kathryn

    @zoonini

    Automattic Happiness Engineer

    Hi there,

    I’ve encountered a strange bug where a custom field called “enclosure” added to a post (which contains an MP3 podcasting URL) is getting erased whenever the post is saved. The field seems to still be there after pressing “Save/Update” but when you return to the post after closing it, the custom field is completely gone.

    My client noticed this problem recently so I’m not sure when it started, but I haven’t made any changes to the site recently other than update some plug-ins, which I’ve ruled out as the culprit (see below for the reason.)

    I found one workaround that may provide a clue: if the custom field is simply added (using the button “Add custom field”) and the post is not re-saved afterwards, it does not get erased. So it seems like it’s definitely the act of saving that is causing the erasure. This workaround is not practical in the long term as occasionally my client needs to go back and edit the post, and the enclosure then gets erased and does not correctly appear in the podcast feed.

    I can add custom fields with any other name besides “enclosure” and they don’t get erased.

    I’ve tried turning off all plug-ins, but the problem persists.

    Two additional strange things:

    1) I noticed this Trac history which at first sounds related, but in my case the same MP3 URL is linked to in the post itself, so perhaps it’s not the same issue.

    2) I have the same site (same custom theme, plug-ins) running on my test server, and I do not have the enclosure erasing problem. I can edit posts there and the enclosure stays, as it should. Both test and live site are on the same server and running the same version of WP (3.3.1). I can’t think what the difference could be that might cause this issue.

    Thanks in advance for any ideas.

Viewing 15 replies - 16 through 30 (of 49 total)
  • Moderator Kathryn

    @zoonini

    Automattic Happiness Engineer

    Hiya, I do have an almost identical install already running on a test server.

    Let me go install the few additional plug-ins on the test site that that the live site has – and see what happens!

    Moderator Kathryn

    @zoonini

    Automattic Happiness Engineer

    Still no luck. Cannot get enclosures to be erased on the test server – same theme, same plug-ins. 🙁

    esmi

    @esmi

    Forum Moderator

    Can you run php info() on both servers (local & live) and see if any obvious differences crop up?
    Anything cropping up in the server’s error logs?

    Moderator Kathryn

    @zoonini

    Automattic Happiness Engineer

    I will check the server logs…

    I can also try running phpinfo() but it’s literally the same server (mine) so I don’t expect to see any differences… so weird.

    Thanks again for your persistence!

    esmi

    @esmi

    Forum Moderator

    Are the two sites literally on the same server? If so,l that rules out anything at the server level and you’re back to looking at the environment of the sites themselves. I have to ask… have you tried a db plugin reset?

    Moderator Kathryn

    @zoonini

    Automattic Happiness Engineer

    Yes, the two sites are literally on the same server: my own dedicated box. Same IP and same physical machine.

    I have to ask… have you tried a db plugin reset?

    What do you mean exactly by a db plug-in reset? Is it using a plug-in like the one I mentioned above to set all plug-ins to their defaults?

    If so, I haven’t – am nervous about having to reset every single plug-in. In fact, we have one plug-in doing an A/B split test right now gathering stats – things like that just can’t be reset, unfortunately.

    esmi

    @esmi

    Forum Moderator

    What do you mean exactly by a db plug-in reset?

    The Phpmyadmin method described in resetting the plugins folder.

    Moderator Kathryn

    @zoonini

    Automattic Happiness Engineer

    Thanks, esmi – I haven’t tried that. What do you think is the risk of plug-ins getting messed up when reverting the option_value field back after the test?

    esmi

    @esmi

    Forum Moderator

    A well coded plugin should only remove its settings from the db when it is deleted via the Admin, so the good ones should be fine. However, in these situations, I sometimes take screenshots of the more complex settings pages – just in case. If you use Firefox, the Pearl Crescent Page Saver add-on is brilliant for this as you can save a screenshot a complete page (not just the visible part) in 2 clicks.

    Moderator Kathryn

    @zoonini

    Automattic Happiness Engineer

    Thanks for the tips, Esmi!

    Going back to the error logs, this is the only error showing from yesterday, it relates to the Yet Another Related Posts plug-in:

    [Tue Jan 31 11:19:39 2012] [error] [client xxxxx] PHP Warning:  Invalid argument supplied for foreach() in /home/xxxxxx/public_html/boc/wp-content/plugins/yet-another-related-posts-plugin/options-meta-boxes.php on line 236, referer: http://www.boxofcrayons.biz/boc/wp-admin/plugins.php?activate-multi=true&plugin_status=all&paged=1&s=
    
    [Tue Jan 31 11:19:39 2012] [error] [client xxxxx] PHP Warning:  Invalid argument supplied for foreach() in /home/xxxxxx/public_html/boc/wp-content/plugins/yet-another-related-posts-plugin/options-meta-boxes.php on line 177, referer: http://xxxxxx/boc/wp-admin/plugins.php?activate-multi=true&plugin_status=all&paged=1&s=

    I could try resetting YARRP to its defaults in the database if I find instructions on how to do that – do you think that’s worth a try? There is no similar error on the test server.

    Regarding the phpMyAdmin plug-in reset – I could perhaps try it on the test server first and see if any plug-in settings are lost. Good tip to take a screenshot of all settings first, too.

    esmi

    @esmi

    Forum Moderator

    Yes – I think it’s worth a try.

    Moderator Kathryn

    @zoonini

    Automattic Happiness Engineer

    Reporting back:

    Completely uninstalling YARPP including the database tables – no effect, enclosure still erasing.

    Next, I went into phpMyAdmin to try to reset the plug-ins folder, following the directions linked to above.

    But… the value of the active_plugins field in question already says a:0:{} so now I’m stuck again. 🙁 See screenshot here: http://www.twitpic.com/8efe8w

    Moderator Kathryn

    @zoonini

    Automattic Happiness Engineer

    p.s. do you think I should instead try resetting the plug-ins folder with method 2 – i.e. by renaming it via FTP ?

    esmi

    @esmi

    Forum Moderator

    value of the active_plugins field in question already says a:0:{}

    Are any plugins active?

    do you think I should instead try resetting the plug-ins folder with method 2 – i.e. by renaming it via FTP ?

    Yes.

    Moderator Kathryn

    @zoonini

    Automattic Happiness Engineer

    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!!!

Viewing 15 replies - 16 through 30 (of 49 total)
  • The topic ‘Enclosure Custom Field Erasing after Saving Post’ is closed to new replies.