Diamond Shaped Question Marks Littered Posts of Sites Of Users When Upgrade To MultiDB 3.0.3

Multidb 3.0.3 has a problem as it convert most users blog on my wordpress/buddpress multi site with characters with diamond shaped question marks in blog posts. When I checked, I see that users' blog posts' html source and even inside their dashboard does show utf-8 character encode. To solve the problem I have a test user to export the old posts, and delete site, recreate site and reimport posts to strip away diamond shaped question marks that littered the site. Can you tell me why is this happening when upgrade to db.php of multidb 3.0.3 from 3.0.2? Thanks..

  • Barry
    • DEV MAN’s Mascot

    Can you tell me why is this happening when upgrade to db.php of multidb 3.0.3 from 3.0.2

    If you had no problems with 3.0.2 (relating to connections dropping or errors) then please move back to that version for now. - I've not come across any encoding issues on my installs, and to be honest, the code changed in the 3.0.3 upgrade doesn't touch the standard WP db functions so I'm not sure what is happening with your install.

    Can you check in something like phpmyadmin to see if the encoding issue is only when the data is displayed in wp or is actually incorrect in the database as well.

  • argh2xxx
    • The Incredible Code Injector

    Strangely, only very old blogs from users who created their blogs long before the users who created their blogs with wordpress 3.0.1 that got hit with diamond shaped question mark. I solve the problem by import such blogs from exports, and the imports fix the question marks problem. I guess the databases store the wrong encode, by exporting and then importing, the databases automatically fix the encode on the new imports? LOL, but that how I solve it, and I have not a clue why! It's like magic. I hope you know...

  • VentureMaker
    • Site Builder, Child of Zeus

    Barry,

    I confirm the issue with 3.0.3 and spooky symbols.
    Happened here on 2 installs.
    We rolled back to 3.0.2 but as you know 3.0.2 has that nasty error like Warning: mysql_real_escape_string(): 26 is not a valid MySQL-Link resource in .../public_html/wp-includes/wp-db.php on line 785

    I suspect this is happening because you don't specify connection encoding in m_wpdb

    I've sent an email to you guys some time ago with my modified versions of move-blogs.php script and some explanations. You can refer to it and check how I specified connection encoding:
    mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'");

    Ditto in db.php and it'll do the trick :slight_smile:

  • VentureMaker
    • Site Builder, Child of Zeus

    Barry,

    I confirm the issue with 3.0.3 and spooky symbols.
    Happened here on 2 installs.
    We rolled back to 3.0.2 but as you know 3.0.2 has that nasty error like Warning: mysql_real_escape_string(): 26 is not a valid MySQL-Link resource in .../public_html/wp-includes/wp-db.php on line 785

    I suspect this is happening because you don't specify connection encoding in m_wpdb

    I've sent an email to you guys some time ago with my modified versions of move-blogs.php script and some explanations. You can refer to it and check how I specified connection encoding:
    mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'");

    Ditto in db.php and it'll do the trick :slight_smile:

  • Barry
    • DEV MAN’s Mascot

    @VentureMaker - thanks will take a look again and see if we can get a test version out.
    The strange thing is though, I didn't change any of the actual connection code, and the rest (apart from the db connection part) is standard WP db library (extended into our layer) - so it's finding the difference between the two that caused the issue I'm investigating at the moment.

  • VentureMaker
    • Site Builder, Child of Zeus

    I saw that you didn't change anything related to connections and I also find this weird.
    But we've learned our lesson already (not only with WP) - connection should specify all parameters, including encoding. This won't harm, it may only help :slight_smile:

  • argh2xxx
    • The Incredible Code Injector

    OK, so i also find out that my main site (not user blog) when create a new post with double blank space after a punctuation mark such as period results in a weird character as this: Â. When create only one blank space after a punctuation mark such as exclamation point (i.e., period, comma), the strange character of  magically disappears.

    Under setting >> reading >> encoding for pages and feeds I have UTF-8 as the default. I don't see why the strange characters keep appearing (such as diamond shape question mark on other user blogs) right after multidb upgrade (i.e., to the very latest as now as in the moment of my writing this very post).

    Help?

  • drmike
    • DEV MAN’s Mascot

    info@sbemedia, a link so we could see what's happening would be helpful as well as a walkthrough of what you've done please.

    Usually it;s a charset issue within your databases. Did you just setup multidb? If so, what was the original charset for the db? What's the one for the databases you;re now using?

  • info@sbemedia
    • Flash Drive

    sbeadverts.com/ If you look at the services section healine you will see an example. This problem seems to come and go. I have checked DB settings in my php admin, its all utf8_unicode_ci, I have also tried Commenting these two lines out in wp-config.php

    // define('DB_CHARSET', 'utf8');
    // define('DB_COLLATE', '');

    No change. Still a strange  keeps showing up everwhere there is a doubble space.

    This is a fresh install of wp 3.0.4 with Multi-DB version 3.0.5
    Active Plugins:
    Supporter
    Supporter ads
    Secure WordPress
    Smart Youtube
    SwfObj
    WordPress Importer

    I have uninstalled all plugins and cleaned DB still no change.
    I have deleted everything and started over, Even if all I have installed is wp and multi-db I get this error.

  • drmike
    • DEV MAN’s Mascot

    Just curious. Could you do me a favor and replace this line in your theme's header.php

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    with this:

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />

    and see if that helps please.

  • drmike
    • DEV MAN’s Mascot

    Thanks. I was hoping that it was something simple but pity it;s not.

    I;ve gone ahead and forwarded this onto the developer, Barry to take a look.

    edit: While I'm thinking about it, what hosting software is running this site/server? CPanel? Direct Admin?

  • ChuckS
    • The Crimson Coder

    Hi Guys,

    Same problem, I just upgraded from Multisite 3.0.1 with Multi-db 3.0.1 to Multisite and Multi-db 3.0.5. I'm getting the black diamond question marks throughout the text on all my blogs. Any solutions yet? I'm not excited about exporting and importing all my blogs.
    Thanks,
    Chuck S.

  • Shawn
    • The Crimson Coder

    Experiencing the black diamond issues on hundreds of our users blogs. This wasnt happening with multidb 3.0.2 or WP 3.0.5, but upgrading to 3.0.5 and 3.1 over the weekend caused quite a few problems like this. Switching back isn't possible.

    So how do I fix it? There's suggestion here to export and reimport. Ok, how? I have 40k blogs to work with, so this isn't a tiny endeavor. Shutting the site down isn't acceptable. How can I automate the process of either making the corrections to the underlying tables directly, or one-by-one export & import each blog automatically?

    I once had a plugin that would run PHP on each site through the admin panel, but can't find it now. There was also an example for hooking into the network update script. This is extremely frustrating.

    Any thoughts or recommendations would be very much appreciated.

  • Shawn
    • The Crimson Coder

    The solution there, until we hear otherwise, seems to be to down-grade to Multi-db 3.0.4. I'm running WP 3.0.5 and went back to Multi-db 3.0.4

    Unfortunately, there's something else afoot here. Switching to 3.0.4 (or any other MultiDB version) results in all the text widgets for the home blog, and some other blogs, being forcibly removed from the database on the second and subsequent accesses. Manually recreating them works to preserve their data, but this is just evil. For a site like the one I'm working on, there's a TON of data in these text widgets, so when the data is lost, it's a lot of work to recreate it. I've actually gone so far now as to specifically export the widget_text option from wp_1_options first. Sigh.

    Switching to 3.0.4 also just changes the funky characters I see. 3.0.5 shows the black diamonds, but 3.0.4 shows funky A's as well as other characters. (I switched recently from 3.0.2). Switching back to 3.0.2 doesn't help either, as then I get the funky black diamonds again. Can't win here.

  • argh2xxx
    • The Incredible Code Injector

    Hello, it seems to me that the original blogs that got weird character cannot be fixed by update even though I'm using version 3.1 wordpress. Fortunately, newly created sites of members are fixed and don't have the same problem. The question is how to fix the problem of the older blogs/sites?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.