weird characters appearing when editing content+
Permalink Browser Info Environment
Has anyone else found this problem? Whenever I check out a block to edit the picture upon saving some strange accented characters appear in the content section??
It's driving me crazy! (screenshot attached)
It's driving me crazy! (screenshot attached)
Type: | Discussion |
---|---|
Status: | In Progress |
Hi Daniel,
thanks for your speedy response, apologies for only just getting back to you now.
I had a look through my site and managed to find a page with both content and content+. Initially I edited the core content block which produced no error. Then I edited a content+ block on the same page which produced this alongside a number of other instances.
I don't think it's do with cut and paste issues, as when viewed in html mode the characters just appear between the tags as normal. It's a bit like one of those 'wack-a-mole' games at the fair, so when you edit the block and strip out the extra characters, new ones will appear somewhere else in the block.
Also, I just checked my original install having just moved over from a local to web host, and the error does not seem to appear on the original, so it may be a database issue.
If it helps the error is also apparent in new instances of the block as well as those from the original site.
I imagine reinstalling the block would help, although I think I would probably cry if I had to do that : )
thanks for your speedy response, apologies for only just getting back to you now.
I had a look through my site and managed to find a page with both content and content+. Initially I edited the core content block which produced no error. Then I edited a content+ block on the same page which produced this
Night†with
I don't think it's do with cut and paste issues, as when viewed in html mode the characters just appear between the tags as normal. It's a bit like one of those 'wack-a-mole' games at the fair, so when you edit the block and strip out the extra characters, new ones will appear somewhere else in the block.
Also, I just checked my original install having just moved over from a local to web host, and the error does not seem to appear on the original, so it may be a database issue.
If it helps the error is also apparent in new instances of the block as well as those from the original site.
I imagine reinstalling the block would help, although I think I would probably cry if I had to do that : )
PS I think the version number is 5.5.2.1 and I am not running any internationalization/translation
Thanks!
Thanks!
I found some people with similar problems with different software:
http://www.codeasite.com/index.php/developers-corner/php-a-mysql/78...
http://www.silverstripe.org/general-questions/show/17036...
It looks like they are brought about by a charset problem. Can you check your source for a page and see if you have:
Concrete5 should be auto inserting this directly above the title unless you have header_required overridden. Also make sure it isn't declared twice (in your page type/theme and header_required).
It could also be the Character set and Collation that is set by the database. The more I read about it, the more this makes since. I'm not going to say I'm a database expert, so tread lightly with lots of backups if you plan on digging in.
The servers I'm working with have the "content" column, in the "btContentPlus" table set for a character set of "latin1" and a Collation as "latin1_swedish_ci. I haven't experienced this problem, but I also haven't swapped databases with another server than has different settings. Since you moved from local to a webserver, is it possible the databases had different charsets configured?
So I'd check for differences between your localhost and server environment in regard to character sets.
You can also try adding:
to your php.ini file, although I'm not sure this will help if the database has a different charset.
http://www.codeasite.com/index.php/developers-corner/php-a-mysql/78...
http://www.silverstripe.org/general-questions/show/17036...
It looks like they are brought about by a charset problem. Can you check your source for a page and see if you have:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
Concrete5 should be auto inserting this directly above the title unless you have header_required overridden. Also make sure it isn't declared twice (in your page type/theme and header_required).
It could also be the Character set and Collation that is set by the database. The more I read about it, the more this makes since. I'm not going to say I'm a database expert, so tread lightly with lots of backups if you plan on digging in.
The servers I'm working with have the "content" column, in the "btContentPlus" table set for a character set of "latin1" and a Collation as "latin1_swedish_ci. I haven't experienced this problem, but I also haven't swapped databases with another server than has different settings. Since you moved from local to a webserver, is it possible the databases had different charsets configured?
So I'd check for differences between your localhost and server environment in regard to character sets.
You can also try adding:
default_charset = "utf-8"
to your php.ini file, although I'm not sure this will help if the database has a different charset.
Great thanks!
I will try it out and let you know how I get on..
On 14 September 2012 15:12, concrete5 Community <discussions@concretecms.com
> wrote:
I will try it out and let you know how I get on..
On 14 September 2012 15:12, concrete5 Community <discussions@concretecms.com
> wrote:
had a similar issue on some cheap-ass hosting where i had no access to the php.ini. so i did this instead, i added the following line to my .htaccess file:
:)
AddDefaultCharset UTF-8
:)
@nerdess, you are a life saver!!! This did the job for me. Thank you so much!
Thumbs up. @nerdess' solution worked out perfectly, thanks.
What version of Concrete5 are you running?
Was this content copied from a text editor (e.g. Word, etc)? If so, try using the "paste from Word" button in TinyMCE.
Does this only show up in edit mode? If you edit the block do you see the characters? When you see them, is it immediately after an action or appear on their own later/after save?
Are you running any translators / internationalization add-ons?
Can you replicate the issue using a standard Content block?
I replicated all the content translation functions (file IDs, images, etc) from the content block in I believe 5.5. So perhaps it's changed more recently and is inducing errors. I'd be curious if you can get a standard content block to behave this way.