Forums

[Plugin: Sociable] Small bug in 3.5.2 (reset has wrong meta_key) (5 posts)

  1. tacticalvim
    Member
    Posted 2 years ago #

    Line 945 in sociable.php, the wrong meta_key name is used:

    $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = 'sociableoff'");

    should be

    $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");

    I also can't seem (or could not) to get 4 posts that had this meta_key set to turn it off in wp_postmeta table; I would edit the post and this value was checked in the UI - I'd uncheck it, Update post and it would not remove that value from the underlying DB. Digging into my DB and your code let me delete them by hand and now it's all fine, but something's not right in there...

    WP 2.8.6 and Sociable 3.5.2 on CentOS5.

  2. nosferatuscoffin
    Member
    Posted 2 years ago #

    I can confirm this problem.

    After upgrading to 3.5.2 (running WP 2.7.1), it would activate, but would never change the default Position settings (and would instead have all positions options enabled) and would not display any images. A source dump would reveal the plugin was not executing at all.

    After changing the line of code that tacticalvim suggested, the plugin executed properly and is working fine now.

  3. nosferatuscoffin
    Member
    Posted 2 years ago #

    Actually, countermand that.

    The plugin is still generating a wp_postmeta table value of "_sociableoff" whenever a post is either created or edited. Checking or unchecking the "Sociable off" checkbox in the post admin makes no difference, as the table value of "_sociableoff" is always generated no matter what. I have to manually go into phpmyadmin and delete those values everytime a post is created/edited. Otherwise, the post thinks that the plugin is deactivated for that particular post and will then not execute the plugin.

    This is a major bug and one that needs to be addressed post-haste. I will keep digging around the code and see if I cannot find out what is causing it.

  4. tacticalvim
    Member
    Posted 2 years ago #

    @nos: 3.5.2 is not compatible with WP 2.7.x as I found out, it uses a function call that was changed in WP 2.8.x that is not backwards compatible due to the number of parameters required. I'm not at the code right now to remember what it was (some sort of checked() function).

  5. nosferatuscoffin
    Member
    Posted 2 years ago #

    That is what I figured was the problem. Thanks for checking it, Tac.

    I would go ahead and just upgrade the upgrade the client's site to 2.9, but I am also running into another, older recent posts plugin that has problems with WP 2.8+. I might just need to use a different one of those and then upgrade for Sociable to work. Ugh.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags