• Resolved Jason Hendriks

    (@jasonhendriks)


    I am getting a White Screen of Death attempting to install WordPress multisite in an OpenShift WordPress instance, specifically when creating a new sub-site.

    Here’s my error:

    Warning: preg_match() expects parameter 2 to be string, object given in /var/lib/openshift/55090f96fcf933bf4800009b/app-root/runtime/repo/wp-includes/formatting.php on line 3435
    Warning: preg_match() expects parameter 2 to be string, object given in /var/lib/openshift/55090f96fcf933bf4800009b/app-root/runtime/repo/wp-includes/formatting.php on line 3424
    Warning: preg_match() expects parameter 2 to be string, object given in /var/lib/openshift/55090f96fcf933bf4800009b/app-root/runtime/repo/wp-includes/formatting.php on line 3435
    Warning: strip_tags() expects parameter 1 to be string, object given in /var/lib/openshift/55090f96fcf933bf4800009b/app-root/runtime/repo/wp-includes/formatting.php on line 3407
    Warning: strip_tags() expects parameter 1 to be string, object given in /var/lib/openshift/55090f96fcf933bf4800009b/app-root/runtime/repo/wp-includes/formatting.php on line 3407
    Catchable fatal error: Object of class WP_Error could not be converted to string in /var/lib/openshift/55090f96fcf933bf4800009b/app-root/runtime/repo/wp-includes/kses.php on line 1038

    And my steps to create the problem:

    Following instructions at https://codex.www.ads-software.com/Create_A_Network

    1. Unzip WordPress archive in root (i.e. not a subdirectory install)
    2. Git add/commit/push
    3. Setup WordPress (db settings, admin user)
    4. Update wp-config.php to enable multisite
    5. Git add/commit/push
    6. Create network setup with subdirectories
    7. Update wp-config.php with multisite config, enable logging
    8. Create .htaccess in root
    9. Git add/commit/push
    10. Login to WordPress
    11. Add child site
Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Jason Hendriks

    (@jasonhendriks)

    Reproducible.

    hi there!

    on wp-config.php try to change:

    define(‘DB_CHARSET’, ‘utf8mb4’);
    to
    define(‘DB_CHARSET’, ‘utf8’);

    I also changed all the tables in phpmyadmin to utf8_general_ci and now it’s working

    Thread Starter Jason Hendriks

    (@jasonhendriks)

    @diogomelo, are you having the same problem as me?

    yep @postman SMTP. I just changed the charset to utf8 in the wp_config.php and now it’s working. Don’t forget to set all the tables on the db with the same charset

    Thread Starter Jason Hendriks

    (@jasonhendriks)

    I’m stunned. That actually worked! Thank-you!

    I don’t have phpmyadmin, so from MySql I ran :

    ALTER TABLE wp_options CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_blog_versions CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_blogs CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_commentmeta CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_comments CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_links CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_postmeta CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_posts CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_registration_log CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_signups CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_site CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_sitemeta CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_term_relationships CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_term_taxonomy CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_terms CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_usermeta CONVERT TO CHARACTER SET utf8
    ALTER TABLE wp_users CONVERT TO CHARACTER SET utf8

    (I used utf8 instead of utf8_general_ci)

    Nice!

    @diogomelo thank you for this!

    !!!! @diogomelo @postman SMTP you’re my favorite humans. This worked for me too. I didn’t even have to change my tables. Just the wp-config file.

    Thanks!!!

    Genial, a mí también me solucionó el problema y sin tener que actualizar php ni nada.

    Thank you

    Thanks @diogomelo, you really save my time

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Object of class WP_Error could not be converted to string in multisite’ is closed to new replies.