Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi there!

    The plugin is attempting to use the character set configured by your WordPress blog (that’d be ANSI_X3.4-1968), but apparently your current PHP version doesn’t like it that much.

    Workaround:

    1. Go to Plugins > Editor, and use dropdown at the right to select WordPress Popular Posts.
    2. Find:
      // Get blog charset
      $this->charset = get_bloginfo('charset');

      … and change it to:

      // Get blog charset
      //$this->charset = get_bloginfo('charset');

    3. Hit the Update file button to save changes.

    This will make WPP use UTF 8 as the character set and the PHP warning will go away.

    Keep in mind that this modification will be lost next time the plugin is updated so you might want to bookmark this topic for future reference. The alternative would be to ask your host to set PHP’s default character set to UTF 8 (and you may need to change your database’s character set too after that too).

    Thread Starter Daniel

    (@gabu69)

    thanks for the fix

    Why was this not happening before and until this last upgrade?

    Thread Starter Daniel

    (@gabu69)

    Good day hector

    I tried changing my dabatabse to UTF-8 (my php characters default was already UTF8) since some tables were not UTF-8 and the error is still there

    http://bit.ly/1sv3B75

    You can notice, 3 out of 6 boxes are displayed, but the other 3 don’t show up and shows that error

    so it might be another thing?

    Plugin Author Hector Cabrera

    (@hcabrera)

    Why was this not happening before and until this last upgrade?

    That’s because it was not until recently (version 3.1.0, if I remember correctly) that WPP started passing the character set to string manipulation functions (such as the ones needed to shorten the post title, or the one for the post excerpt, etc) so that accented characters would display correctly on the page.

    I tried changing my dabatabse to UTF-8 (my php characters default was already UTF8) since some tables were not UTF-8 and the error is still there

    You probably also need to change a value on your wp_options table as well. There’s an option_name called blog_charset, set its value to UTF-8. I believe that should fix it.

    Thread Starter Daniel

    (@gabu69)

    You probably also need to change a value on your wp_options table as well. There’s an option_name called blog_charset, set its value to UTF-8. I believe that should fix it.

    It’s set as UTF-8, idk what is wrong then :S

    Plugin Author Hector Cabrera

    (@hcabrera)

    That’s odd. Something else is reporting PHP that your charset is ANSI_X3.4-1968. It might be a theme related thing, but you should probably ask your hosting about it to be sure.

    Anyways, an additional temporary fix, same as before:

    1. Go to Plugins > Editor, and use dropdown at the right to select WordPress Popular Posts.
    2. Find:
      $atts .= ' ' . $key . '="' . htmlspecialchars($arg, ENT_QUOTES, false) . '"';
      … and change it to:
      $atts .= ' ' . $key . '="' . htmlspecialchars($arg, ENT_QUOTES, "UTF-8", false) . '"';
    3. Hit the Update file button to save changes.
    Thread Starter Daniel

    (@gabu69)

    Works

    tyty

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Error since i upgraded’ is closed to new replies.