• Hi, i’m experiencing an error with special characters and apostrophes, etc…after an upgrade from 2.3.3 to 2.5.1. Based on info from other threads i found, i’ve tried both commenting out and deleting these 2 lines, which were not in my old 2.3.3 wp-config but are in the current 2.5.1 one:

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

    But when i take them out i get the following error:

    “Warning: Invalid argument supplied for foreach() in /home/content/mywebsite/html/wp-includes/classes.php on line 92”

    And all my pages and posts show page not found errors.
    I’ve also jtried, without success, changing it to:

    define('DB_CHARSET', 'UTF-8'′);
    and
    define('DB_CHARSET', ''′);

    I’ve also tried the following plugin, but it made no impact at all:
    UTF-8 Database Converter

    My old 2.3.3 i’m pretty sure was set to UTF-8 in the admin, as is the current version. The header file in my theme has always set the coding of the page to utf-8 as well, so i’m not sure why this is happening and am unsure where to procede from here.

    The garbled code that is showing up looks something like this:
    – Instead of network’s it shows network’s
    – Instead of “Please Help Me” it shows “Please Help Me”

    Any help would be very much appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • But when i take them out i get the following error:

    “Warning: Invalid argument supplied for foreach() in /home/content/mywebsite/html/wp-includes/classes.php on line 92”

    Then you are making some mistakes during the edit.
    Try it again. That’s the only way to deal with this.

    Thread Starter 319

    (@noyz319)

    I’ve tried and re-tried dozens of times to both edit, comment out and delete those two lines. Also tried re-upping my old wp-config from the 2.3.3 version that didn’t have them in there. No luck though, still just all “Page Not Found” errors with the below message at the very top of ever page:

    “Warning: Invalid argument supplied for foreach() in /home/content/mywebsite/html/wp-includes/classes.php on line 92”

    I’ve tried using the default theme for 2.5.1 to see if it was my theme causing the issue, but the same problem occurs.

    those backticks shouldn’t be there in your example

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

    Good catch, junap!

    Thread Starter 319

    (@noyz319)

    Its not the backticks, those just showed up here in the forum for some reason. My wp-config is the exact same as the sample one that comes default, except for the updated database info etc.

    I’ve tried disabling all plugins as well, not sure what this could be.

    Thread Starter 319

    (@noyz319)

    In the codex it says:

    Warning for those performing upgrades: If DB_CHARSET and DB_COLLATE do not exist in your wp-config.php file, DO NOT add either definition to your wp-config.php file unless you read and understand Converting Database Character Sets. Adding DB_CHARSET and DB_COLLATE to the wp-config.php file, for an existing blog, can cause problems — as Ryan Boren says, “your queries will go boom!”

    http://codex.wordpress.org/Editing_wp-config.php

    I wish this info was included alongside the wordpress upgrade instructions. But is there a solution for people who have accidently done this? It seems to have done some sort of change/damage where just removing the lines of code are not providing a cure.

    Two things.

    I’ve searched for your error:
    http://wordpress.org/search/wp-includes%2Fclasses.php+on+line+92?forums=1
    and it seems to be a 2.5.1 specific bug.

    You could also try to upgrade “further” to the most recent 2.6.2 and see if it works.

    p.s. I hope you have a DB backup of your pre-upgrade version, so you could always go back to that and start the upgrade over.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Apostrophes and other special characters showing strange code after upgrade’ is closed to new replies.