Support » Plugin: Wordbooker » [Plugin: Wordbooker] Per post settings forgotten – intermittent

  • Resolved dreamfoundry


    By default I have “Publish Post to Facebook” disabled as I don’t want all posts published.

    When I create a post I want published I then enable “Publish Post to Facebook” and set the “Facebook Post Attribute line”. I then either save to drafts, or schedule the post.

    When I then leave the page and come back, these settings have often unset themselves. Sometimes they stay set, but if I come back and edit the post at a later stage they often come unset when I save.

    This leads to a lot of situations where my scheduled post is published, but not pushed to Facebook.

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Steve


    Which version of the plugin are you using?

    I have 1.8.16. This has, however, been happening for some while.

    Plugin Author Steve


    There was a bug in a previous version where it didn’t save settings properly when you saved a draft but I thought I’d fixed it.

    Any ideas of how I can fix this?

    Currently I have to go to posts page and reload post to see if the settings were saved properly. (Simply refreshing the posts page will always show the tick box ticked.)

    Plugin Author Steve


    The bug was such that where options that were turned on at the blog or user level on the options screen remained on even if you turned them off at the post level.

    If the posts were made before Wordbooker was installed then they wont by default have any settings so should inherit the current blog/user level settings.

    The only way to fix it is to go to each post that has not yet been published, double check the settings and update the post

    These are all posts made after Wordbooker was installed.

    I also just managed to reproduce the error. Here is the sequence of events.

    1) I open a scheduled post and check that the settings are still set. They are. I then save click Update.

    2) I go back to the posts page.

    3) I re-open the post. The settings are still set. I click update again.

    4) I go back to the posts page.

    5) I re-open the post. The “Publish Post to Facebook” check box is not checked any more. The “Facebook Post Attribute line” is now also empty.

    This does not always happen after two saves. Sometimes one, sometimes ten, but it means I always have to go back and check or risk not having the post published to Facebook.

    Plugin Author Steve


    OK, thats very odd – I’ll try to reproduce it here. Its odd because it would suggest that the post_meta is not getting pulled back properly.

    I’ve been doing more experimentation. Seems I was slightly wrong.

    Seems the data is lost in the following circumstance (might be the same though):

    1) I open the post, and close without updating.

    2) I open the post, WP creates an autosave, I close with/without saving.

    Just for the record, I use the “Revision Control” plugin to limit revisions to the latest 10. I’m going to disable it now and see if the problem persists.

    Okay, just disabled the “Revision Control” plugin, but the problem persists.

    It does, however, seem as if the settings are lost each time WP creates an autosave. If I just open the post and close and open again the settings are fine, but if I leave it for long enough to create an autosave it loses the settings.

    Plugin Author Steve


    OK – so basically the code doesn’t fire on Autosave…. that gives me something to work on.

    Plugin Author Steve


    It looks like its a oddity in how Autosave works – so I’ll need to do a little bit of coding to get round it.

    Plugin Author Steve


    Actually its a huge bug in autosave… custom post meta data isn’t included in the $_POST when autosave fires.

    Bummer. :/

    Anyway, I can confirm that if I disable the Autosave function the problem goes away.

    Plugin Author Steve


    I’ve asked on the WP forums to see if there is some way round this… or if its been reported as a bug/defect.

    However I’ve made a change to my code which means that if its an autosave it doesn’t do anything – so all that will happen is that any changes to Wordbooker options on that post since the last save will be lost, rather than everything.

    Thanks. I was about to suggest that. 😉

    Could you let me know which lines to change in your plugin, or will you be pushing some new code on the the server soon?

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Plugin: Wordbooker] Per post settings forgotten – intermittent’ is closed to new replies.