WordPress.org

Ready to get started?Download WordPress

Forums

Twitter Blackbird Pie
[resolved] Cannot redeclare class Services_JSON on line 116 (12 posts)

  1. Nathan
    Member
    Posted 3 years ago #

    I'm getting an error that kills the page:

    Fatal error: Cannot redeclare class Services_JSON in /home/modernjournalist/modernjournalist.com/wp-content/plugins/twitter-blackbird-pie/json.php on line 116

    Post Reference: Twitter Week in Review

    I haven't changed anything.

  2. bradvin
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Nathan,
    it seems the problem is the same as the problem described here. I need to update the plugin to allow for this. It seems that it is conflicting with another plugin. A quick fix/hack would be to rename the class in json.php to Services_JSON_Blackbrid or something similar. I will work on a better solution and update the plugin. Thanks for pointing out this issue

  3. Nathan
    Member
    Posted 3 years ago #

    I did a find and replace in json.php to change Services_JSON to Services_JSON_Blackbird and it worked!

    Thanks for the help.

  4. the.mnbvcx
    Member
    Posted 3 years ago #

    Had the same problem - more or less all over sudden after I cleaned up my plugins (deactivated some, replaced some others). Unfortunately I only noticed afterwards so I can't tell exactly which plugin broke it.

    Already tried replacing your json.php with an empty file but that fixed the problem only half way, still leaving some parts of the theme (Mystique) messed up.
    Unfortunately replacing all Services_JSON with something else shows just the same results, so I will now take down the affected articles until an update is available.

  5. bradvin
    Member
    Plugin Author

    Posted 3 years ago #

    I managed to duplicate the issue and solved it. Version 0.3.3 now includes a check to first see if the class Services_JSON has already been declared.

    thanks for using the plugin

  6. the.mnbvcx
    Member
    Posted 3 years ago #

    Brad,

    thx for fixing it - at least for me the problem is now solved.

  7. Raving Drifter
    Member
    Posted 3 years ago #

    Hi Bradvin,

    Thanks for the great plugin and update. It works nicely with my localhost WP, but I'd like to report to you that the problem somehow remains in my live WP3 (mu enabled). The error as:

    Parse error: syntax error, unexpected T_STRING,
    expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'
    in /wp-content/plugins/twitter-blackbird-pie/unicode.php on line 8
    
    Fatal error: Call to undefined function: encodeunsafe()
    in /wp-includes/compat.php on line 136

    and it turns out the "line 136 of compat.php" is still json relevant I guess:

    return $wp_json->encodeUnsafe( $string );

    My live WP runs some plugins and some maybe uncommon for you. I don't know coding at all, so please let me know if you need more information to figure it out and I'd love to help.

    Thanks again!

  8. Joss Winn
    Member
    Posted 3 years ago #

    I'm using this on a multisite enabled install of WP and it's killing the page that I'm trying to use it on.

    I'm also using BuddyPress, and I've noticed that the BuddyPress admin bar does not load on the page either.

    Here's my error log when I reload the page:

    PHP Fatal error: Call to undefined function mb_strlen() in /var/www/html/wp-content/plugins/twitter-blackbird-pie/unicode.php on line 20, referer: http://example.com/projects/

  9. WillMedina
    Member
    Posted 3 years ago #

    Hi,

    I have the same problem about the mb_strlen() function on line 20 ... Mi PHP Version is 5.2.9 btw.

  10. bradvin
    Member
    Plugin Author

    Posted 3 years ago #

    I googled the mb_strlen problem and it seems that you need to have the php_mbstring module enabled in your php.ini

    read more here:
    http://modxcms.com/forums/index.php?topic=33515.0

    or here:
    http://www.joomlaxt.com/forum?func=view&catid=17&id=7596

  11. WillMedina
    Member
    Posted 3 years ago #

    I see...

    Well, I'll check the configs on my site! Thanks for the fast reply bradvin!! And thanks for the plugin btw, its very osom!!! :D

  12. bradvin
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Will

    Did you manage to configure yr server to solve the issue yet?
    Pls let me know so others can learn from this

    thanks
    Brad

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic