Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   [SOLVED] UTF8 Character Error (http://forum.bytesforall.com/showthread.php?t=21465)

darwin8 Feb 2, 2014 12:38 AM

[SOLVED] UTF8 Character Error
 
Have just upgraded a site to current versions, WordPress 3.8.1, and Atahualpa 3.7.13

In Body, Text & Links > Body Style, the following now appears:

<br />
<b>Warning</b>: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspec ialchars</a>]: charset `utf8_general_ci' not supported, assuming iso-8859-1 in <b>/home/harmony/public_html/content/wp-includes/formatting.php</b> on line <b>3019</b><br />
<br />
font-family: "Palatino", "Georgia", "Times New Roman", "Times", serif;
font-size: 1.0em;
line-height: 1.4em;
color: #ebebeb;
background: url(/content/wp-content/ata-images/background.jpg) repeat top left;
padding-top: 10px; padding-bottom: 10px;


Those first lines, between the <br /> tags, are being added. Deleting them and saving the options has no effect; they automatically come back when I view this page again.

The website: http://www.americachinabridge.com

Things to consider:

1. I have not modified formatting.php, so the standard WP file is functioning. No other WP files, or Ata files, have been modified, they are all standard-issue.

2. This site uses WPML to manage multiple languages, in this case English and Mandarin Chinese. WPML is fully upgraded, to the current version, 2.8.1

3. In the MySQL database encoding, PHPMyAdmin reports Server connection collation as utf8_general_ci - which has always worked fine with the Atahualpa and WP combo.

4. Note also that Chinese language characters being interpreted through the theme, like the blog title and subtitle, are being shown as ASCII garbage; see the header area on any page of http://www.americachinabridge.com, and the language switcher widget on the right sidebar.

What is happening here? Please help.

juggledad Feb 2, 2014 03:58 AM

what happens it you disable the MPML plugin?

darwin8 Feb 2, 2014 11:18 AM

1 Attachment(s)
Disabling WPML: results in no Chinese language display at all. Removes the problem, of course, but defeats the purpose of the website.

I have other sites with the same configuration, same versions etc., that are functioning fine. For example, compare http://www.chinaroyalties.com (OK) with the subject site, http://www.americachinabridge.com (not OK).

Can you tell what's happening in that formatting.php file, line 3019, that's causing Ata to write the error message?

The same error message is also being written into many other Ata fields that allow formatted text, including Style and Configure LAYOUT > Layout Container Style; Style and Edit HEADER AREA (all sections).

This error message is also repeated multiple times on the Edit screen of every Page. See attached screen shot, editing the Home page.

Your assistance sincerely appreciated...

Michael

juggledad Feb 3, 2014 06:17 AM

Go to ato->style & edit header and hit the save at the bottom
Do the same for the center area and footer and see what happens

darwin8 Feb 3, 2014 10:51 PM

Go to ato->style & edit header and hit the save at the bottom

Result: now there are two identicalerror messages inserted. The first, Header Area, now contains:

<br />
<b>Warning</b>: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspec ialchars</a>]: charset `utf8_general_ci' not supported, assuming iso-8859-1 in <b>/home/harmony/public_html/content/wp-includes/formatting.php</b> on line <b>3019</b><br />
<br />
<b>Warning</b>: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspec ialchars</a>]: charset `utf8_general_ci' not supported, assuming iso-8859-1 in <b>/home/harmony/public_html/content/wp-includes/formatting.php</b> on line <b>3019</b><br />
%page-center %logo %bar1 %image %bar2

Same goes for the contents of Logo Area Styling, Logo Image Styling, Blog Title, Blog Tagline, Search Box, Horizontal Bar 1: Styling, and Horizontal Bar 2: Styling.

Do the same for the center area and footer and see what happens

This also duplicates the error message and inserts another, Center Column Style now contains:

<br />
<b>Warning</b>: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspec ialchars</a>]: charset `utf8_general_ci' not supported, assuming iso-8859-1 in <b>/home/harmony/public_html/content/wp-includes/formatting.php</b> on line <b>3019</b><br />
<br />
<b>Warning</b>: htmlspecialchars() [<a href='function.htmlspecialchars'>function.htmlspec ialchars</a>]: charset `utf8_general_ci' not supported, assuming iso-8859-1 in <b>/home/harmony/public_html/content/wp-includes/formatting.php</b> on line <b>3019</b><br />
border-bottom: solid 1px #cccccc;
padding: 10px 15px;

Same doubling of the error message for Center Column Top Widget Area, Center Column Bottom Widget Area; all now contain two error messages.

Before doing the steps you recommended, in each case above there was one error message. Now there are two.

The site is now behaving worse than earlier reported, as the error messages are now being dumped onto the web pages themselves; see http://www.americachinabridge.com

A number of other formatting errors, too numerous to explain, have now showed up; the site is essentially useless now.

The error messages cannot be removed.

juggledad Feb 4, 2014 03:43 AM

if you send me a PM with an admin ID/pw I'll take a peek

darwin8 Feb 4, 2014 11:06 AM

On its way now...thank you.

juggledad Feb 4, 2014 06:37 PM

1 Attachment(s)
please try this
1) backup the site
2) download the following file
3) open the file in a TEXT editor
4) copy the contents
5) go to ATO->Export/Import Settings and paces the copied text into the 'Import Atahualpa settings' option
6) hit save
7) go back and look at the 'Configure Header Area' option
8) make a change and save it and see what it looks like.

darwin8 Feb 5, 2014 12:37 AM

Followed your instructions, everything went fine.
Made a change in the HEADER as you suggested -- deleted the two error messages, and saved.

Came back with one error message in the field edited.

All the other fields had an additional error message now.

Tried a couple of different changes, and each time an additional error message was incremented to all fields.

No change in the behavior of the website, still unuseable. This site has nearly three years worth of work in it. I have a backup, and can restore back to where there was no problem. This would take ATA back many revs.

juggledad Feb 5, 2014 04:31 AM

Duh…it pays attention to read the error message (head slap)
HTML Code:

...charset `utf8_general_ci' not supported, assuming iso-8859-1...
So I went to dashboard->settings->reading->Encoding for pages and feeds and changed the value from `utf8_general_ci' to 'iso-8859-1' and when you change things, the error is not happening.

Re Import the setting file I sent you and test again.

what is odd is that option was removed in WP 3.5.0….

UPDATE: I changed that option to UTF-8 and now it is gone. Looks like that was the issue…a wordpress change/holdover.


All times are GMT -6. The time now is 01:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.