Problems, need help? Have a tip or advice? Post it here.
8 posts Page 1 of 1
Hi, I have installed CouchCMS v1.4 (build 20140117), but recently I noticed that it cant handle č, ť, ň and probably also some more characters..

When I write these characters in CMS and then click Save, it changes them to "?"
I am using utf-8 encoding, in CMS and web also. On classic static webpage encoding works, just not the text generated by CouchCMS..

where can be the problem? is it somewhere in functions.php?

Thanks a lot, I have no idea what to do, I'm an amateur.

Attachments

Hi,

There are plenty of Slavic language sites using Couch and none have reported this issue.
Still, I tested again after reading your post and my richtext editor shows the following after saving -
Untitled-1.png
Untitled-1.png (4.95 KiB) Viewed 1414 times

So, I think I can safely say that the problem is not with the CMS, per se, but perhaps has something to do with your local configuration.

If your site happens to be online, we can take a look at it.
However, Couch v1.4 is ancient now. I'd request you to please upgrade to the latest version (v2.1b as available from GitHub) first.
Maybe, the upgrade by itself might rectify the condition.
Thanks,

The web is bbamfiteater.sk
I think it can be narrowed down to old cms version or problem within that. Will try to update it with newest version. Can it be done somehow easily without changing all the passwords and stuff?

P.S.: € symbol is also unknown

Thank you.
Can it be done somehow easily without changing all the passwords and stuff?

Nothing needs to be changed - the upgrade only requires copying over the newer version files onto the existing ones (full details - https://github.com/CouchCMS/CouchCMS/bl ... UPGRADE.md).

Do make sure, however, to take a database backup first.
Hi,

I upgraded CMS, but the problem stays the same.. I suppose the problem can be somewhere in file functions.php, because there is Utf-8 coding mentioned. But I have no idea what to edit..

all the files are saved in utf-8 coding and metatag in HTML header is:
<meta http-equiv=Content-Type content="text/html; charset=utf-8">

http://bbamfiteater.sk

Thanks, I'm out of ideas..

Attachments

I managed to get encoding in CMS menu right. The file functions.php was not saved in utf encoding - my bad..but have no luck with the content..
Now that the problem with functions.php has been rectified, have you tried inputting and saving new content in the richtext editor to see what happens? The older input (before the problem was rectified) is not going to change back automatically.

Please test and let me know. If the problem persists you may PM me the FTP+Couch creds for your site and I'll take a look at the issue.
Thanks for entrusting me with the creds.

I had a look at the site and observed that the database upon querying for the Couch data table returns the following definition -
CREATE TABLE `couch_data_text` (
`page_id` int(11) NOT NULL DEFAULT '0',
`field_id` int(11) NOT NULL DEFAULT '0',
`value` longtext,
`search_value` text,
PRIMARY KEY (`page_id`,`field_id`),
) ENGINE=MyISAM DEFAULT CHARSET=latin1

The highlighted attributes above are unexpected and wrong.

The correct definition for the table should have been as follows -
CREATE TABLE `couch_data_text` (
`page_id` int NOT NULL,
`field_id` int NOT NULL,
`value` longtext,
`search_value` text,
/* Keys */
PRIMARY KEY (`page_id`, `field_id`)
) ENGINE = InnoDB
CHARACTER SET `utf8` COLLATE `utf8_general_ci`;


Since the eventual repository where your submitted data gets stored is storing it in Latin1 and not UTF8, I think it should be clear what the source of your problem is.

As for the rectification, the Couch installation routine explicitly asks for InnoDB and UTF8. Your database did not comply to the request so it has to be some permission/configuration problem at the database level.

Perhaps you should contact your hosting provider for help on this.

Hope it helps.
8 posts Page 1 of 1