WordPress.org

Forums

  1. Andrey4o
    Member
    Posted 2 years ago #

    I have this message in categories
    arning: trim() expects parameter 1 to be string, object given in /home/andreyandreev/andrey-andreev.com/wp-content/plugins/nextgen-facebook/nextgen-facebook.php on line 814

    For example:
    http://www.andrey-andreev.com/en/category/countries/serbia/
    Can you help me?

    http://wordpress.org/extend/plugins/nextgen-facebook/

  2. JS Morisset
    Member
    Plugin Author

    Posted 2 years ago #

    I've added extra debugging messages to the DEV version to get more info on this. Please download and install the latest DEV version from http://downloads.wordpress.org/plugin/nextgen-facebook.zip. Then turn on NGFB's debug mode from NGFB's setting page.

    Thanks,

    js.

  3. JS Morisset
    Member
    Plugin Author

    Posted 2 years ago #

    Andrey,

    I just checked your site and notice the following error:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/andreyandreev/andrey-andreev.com/wp-content/plugins/nextgen-facebook/nextgen-facebook.php on line 817

    A little research reveals this is probably a WP database issue with taxonomies.

    I'm going to try and handle this error in NGFB. Let me get back to you a bit later...

    Thanks,

    js.

  4. Andrey4o
    Member
    Posted 2 years ago #

    Thank you very much for your support :) !

  5. JS Morisset
    Member
    Plugin Author

    Posted 2 years ago #

    Ok, I found the problem, and a solution.

    It appears that if there's a problem with the taxonomy table, WP will return an object instead of the intended string. So, for example, instead of using this:

    $cat_parents = get_category_parents($cat, TRUE, '' . $delimiter . '')

    We have to use the following to avoid PHP throwing an error:

    echo is_wp_error( $cat_parents = get_category_parents($cat, TRUE, '' . $delimiter . '') ) ? '' : $cat_parents;

    Hopefully the WP folks will fix this problem, but until then, at least NGFB will be able to handle it. ;-)

    This solution came from http://wordpress.org/support/topic/catchable-fatal-error-object-of-class-wp_error-could-not-be-converted-to-string-11?replies=17.

    Please download and install the latest DEV version from http://downloads.wordpress.org/plugin/nextgen-facebook.zip again, and let me know the results.

    Thanks,

    js.

  6. Andrey4o
    Member
    Posted 2 years ago #

    Thank you very much... I think now it work well :) Thank you :)
    Andrey

  7. JS Morisset
    Member
    Plugin Author

    Posted 2 years ago #

    You're welcome.

    Please consider a donation and a rating, if you can.

    Thanks,

    js.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags