WordPress.org

Ready to get started?Download WordPress

Forums

WP phpBB Bridge
Catchable fatal error: Object of class WP_Error could not be converted to string (22 posts)

  1. MAzZY
    Member
    Posted 3 years ago #

    I've got this error using wp-phpbb bridge
    Catchable fatal error: Object of class WP_Error could not be converted to string in /var/www/name/data/www/site.ru/wp-includes/formatting.php on line 2822

    /**
     * Properly strip all HTML tags including script and style
     *
     * @since 2.9.0
     *
     * @param string $string String containing HTML tags
     * @param bool $remove_breaks optional Whether to remove left over line breaks and white space chars
     * @return string The processed string.
     */
    function wp_strip_all_tags($string, $remove_breaks = false) {
    2822-->	$string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );
    	$string = strip_tags($string);
    
    	if ( $remove_breaks )
    		$string = preg_replace('/[\r\n\t ]+/', ' ', $string);
    
    	return trim($string);
    }

    WPMU 3.1.2 + BuddyPress 1.2.8 + phpBB 3.0.7

  2. Acelondoner
    Member
    Posted 3 years ago #

    Maybe conflicting with a caching plugin? Do you have a caching plugin installed? I'm just taking a guess BTW.

  3. MAzZY
    Member
    Posted 3 years ago #

    This error appears ONLY for russian nicknames. Using latin nick no problem.

  4. merianos
    Member
    Plugin Author

    Posted 3 years ago #

    This probably is a WordPress bug and not a bug comes from WP phpBB Bridge.

  5. MAzZY
    Member
    Posted 3 years ago #

    How can I solve this problem?

  6. MAzZY
    Member
    Posted 3 years ago #

    After turning off all plugins and enabling default theme problem not solved.

  7. This error appears ONLY for russian nicknames. Using latin nick no problem.

    it could be a sanitization issue. WHEN are you getting that error?

  8. MAzZY
    Member
    Posted 3 years ago #

    When I'm login with russian nickname - click Login, plugin redirecting to phpBB forum, logging there and redirect back to WP, where I'm get error.

  9. Okay, and when you have the plugin turned off, and it doesn't redirect to phpBB, can you login?

  10. MAzZY
    Member
    Posted 3 years ago #

    Yes, of course. But only latin nick.
    By default, i can't register in WP with russian symbols.
    WP phpBB bridge use logins from phpBB where allowed any symbols.

  11. MAzZY
    Member
    Posted 3 years ago #

    Is that all?

  12. MAzZY
    Member
    Posted 3 years ago #

    May be debug info could help you

    Notice: Use of undefined constant STRIP - assumed 'STRIP' in Z:\home\site.ru\www\forum\includes\functions.php on line 54

    Notice: Use of undefined constant STRIP - assumed 'STRIP' in Z:\home\site.ru\www\forum\includes\functions.php on line 54

    Notice: registration.php is deprecated since version 3.1 with no alternative available. This file no longer needs to be included. in Z:\home\site.ru\www\wp-includes\functions.php on line 3345

    Notice: update_usermeta is deprecated since version 3.0! Use update_user_meta() instead. in Z:\home\site.ru\www\wp-includes\functions.php on line 3303

    Notice: Object of class WP_Error could not be converted to int in Z:\home\site.ru\www\wp-content\plugins\wp-phpbb-bridge\plugin.php on line 68

    Notice: Object of class WP_Error could not be converted to int in Z:\home\site.ru\www\wp-content\plugins\wp-phpbb-bridge\plugin.php on line 73

    Notice: Undefined property: user::$ID in Z:\home\site.ru\www\wp-content\plugins\wp-phpbb-bridge\plugin.php on line 73

    Notice: Object of class WP_Error could not be converted to int in Z:\home\site.ru\www\wp-includes\pluggable.php on line 30

    Catchable fatal error: Object of class WP_Error could not be converted to string in Z:\home\site.ru\www\wp-includes\formatting.php on line 2822

  13. Sorry, I was off with my RL.

    By default, i can't register in WP with russian symbols.
    WP phpBB bridge use logins from phpBB where allowed any symbols.

    Well... The best I can think to do is set phpBB so it doesn't allow symbols WP doesn't. WordPress is acting as designed.

  14. MAzZY
    Member
    Posted 3 years ago #

    There are near 200 forum users with russian nicknames...
    Is there any possibility(hack, plugin, mod) to use other symbols in WP logins?

  15. MAzZY
    Member
    Posted 3 years ago #

    Big thanks!
    I'll try it

  16. MAzZY
    Member
    Posted 3 years ago #

    It's good plugin but not solve this problem.
    Creating new user with turned off wp-phpbb bridge is OK. But with turned on I've got error. Where is the fault?

  17. The fault is in the wp-phpbb bridge not sanitizing the users OR the fact that you set up phpBB in a way that's incompatible with WordPress.

  18. shammah
    Member
    Posted 3 years ago #

    I just posted a new blog and when I open my blog site the whole page doesn't come up, but if you click on the blog title, it will. This is what I see on the page:

    (this is part of the blog I wrote - and there's nothing else on the page but the following):

    "works together in Nature, and we would find answers, if we but looked to nature, observed her seasons, etc. etc…..even the angels are ‘tied’ into this ‘seasonal’ stuff; pretty amazing! Continue reading →

    → Leave a comment
    <a href="
    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/sham8551/public_html/This/wp-content/themes/coraline/loop.php on line 68

  19. shammah
    Member
    Posted 3 years ago #

    I deleted the blog post - and things seem to be working fine; can't figure it out? Any suggestions. Thanks.

  20. shammah
    Member
    Posted 3 years ago #

    Okay, so the same error is back again:

    <a href="
    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/XXXXX/public_html/This/wp-content/themes/coraline/loop.php on line 68

    Could it be the template I am using is not compatible with WP 3.1.3?

  21. freakenbox
    Member
    Posted 2 years ago #

    I had the same problem with usernames, but this function helped me

    function allow_cyrillic_username($username, $raw_username, $strict) {
    	$username = wp_strip_all_tags($raw_username);
    	$username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username);
    	$username = preg_replace('/&.+?;/', '', $username);
    
    	if ( $strict )
    		$username = preg_replace('|[^a-zа-я0-9 _.\-@]|iu', '', $username);
    
    	return preg_replace('|\s+|', ' ', $username);
    }
    add_filter('sanitize_user', 'allow_cyrillic_username', 10, 3);

    or try this plugin ( haven't tried )
    http://wordpress.org/extend/plugins/wordpress-special-characters-in-usernames/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic