Forums

[resolved] "sociableoff" custom field stacks up on every edit of a post (13 posts)

  1. designshard
    Member
    Posted 1 year ago #


  2. designshard
    Member
    Posted 1 year ago #

    As posted: http://wordpress.org/support/topic/216881

    Version 2.9.5 of the Sociable plugin adds a "sociableoff" variable (value "false" unless set to "true") to the custom fields every single time a post is edited. It doesn't test to see if the value is already set, it adds it again on every save. If you're doing minor tweaks on a published page and save it over and over again with each change, you can quickly collect 20 or more instances of of this custom field variable. I've tried to contact the plugin author, but I've received no reply.

    Any one know how to fix this.

    (Bah sorry for posting cant delete the post!)

  3. stacionari
    Member
    Posted 1 year ago #

    This plugin definitely sucks... I had to delete old post and make the same one again to be rid off 150 instances of socialbeoff custom fields...

    It is so obvious problem that the shame is on authors not to resolve this issue jet..

  4. Stijky
    Member
    Posted 1 year ago #

    Yes, this is a very annoying problem, please if anyone knows of a fix...

  5. t0mmmmmmm
    Member
    Posted 1 year ago #

    Got it to work correctly after I redefined the sociable_insert_post function:

    function sociable_insert_post($pID) {
    	delete_post_meta($pID, 'sociableoff');
    	update_post_meta($pID, 'sociableoff', ($_POST['sociableoff'] ? 'true' : 'false'));
    }

    It may seem stupid to delete the key prior to updating it but it just wouldn't work otherwise.

  6. designshard
    Member
    Posted 1 year ago #

    @t0mmmmmmm i couldnt get this to work it gives me a fatal error where is best to put it , post some more code with it to show better?

    function sociable_insert_post($pID) {
    	delete_post_meta($pID, 'sociableoff');
    	update_post_meta($pID, 'sociableoff', ($_POST['sociableoff'] ? 'true' : 'false'));
    }
  7. udjamaflip
    Member
    Posted 1 year ago #

    If you go into sociable.php and on line 940, thats the function your needing to change, the fix worked for me.

    Thanks t0mmmmmmmm, good find.

  8. gymgangsta
    Member
    Posted 11 months ago #

    could someone be specific as to what lines of code are repalced, or is this added to..etc.. it's not clear to me..thanks

  9. t0mmmmmmm
    Member
    Posted 11 months ago #

    The trick is to redefine sociable_insert_post(), so look for "function sociable_insert_post" in the source and replace the existing function with the one provided above

  10. joostdevalk
    Member
    Posted 11 months ago #

    I've just fixed this in release 2.9.9, thx t0mmmmmm for the fix!!

  11. powderboy
    Member
    Posted 11 months ago #

    I'm still getting this at the bottom of every edited post on WP 2.7 with Sociable 2.9.12. Any ideas?

    http://www.feedthehabit.com/news/discount-lift-tickets-for-the-utah-avalanche-center/

    See the very bottom... "sociableoff: false"

    It's on every post that I've edited since the upgrade this morning. Ugghhh... how do I remove that?

  12. powderboy
    Member
    Posted 11 months ago #

    Well... after reading the first person's post, it appears that I've had an errant tag in my templates showing the meta data at the bottom of the post:

    <?php the_meta(); ?>

    Commented it out and it's gone now. :-) User error... :-)

  13. joostdevalk
    Member
    Posted 11 months ago #

    Good :) could you close the issue you started about this? :)

Topic Closed

This topic has been closed to new replies.

About this Topic