Posted on: 02/02/18 02:33am
By: Anonymous (OMAL)
I copied my geek log site and database. Firstly I checked the new site with old database, without editing config files about mysql connection. That did work. Next, I configured files with copied database, then I had problems. The multibyte characters is displayed as ?(question mark) after submitting stories. The title and contents are corrupted.
What I want to know is where and which are the files of geeklog core system the Story Submission is related to.
Thanks.
Re: Story submission issue
Posted on: 02/02/18 06:52am
By: Laugh
Are you using Geeklog v2.1.3?
You need to make sure your database collation and tables are set to utf8mb4_general_ci or something similar.
Also in db-config.php file make sure this is set:
$_DB_charset = 'utf8mb4';
Finally in the Geeklog Configuration make sure the config option:
Remove 4-byte utf-8 characters? (?)
is set to false.
Re: Story submission issue
Posted on: 02/04/18 07:28am
By: OMAL
Thanks Laugh.
Quote by: LaughAre you using Geeklog v2.1.3?
No, unfortunately it's not decent version but v1.4. Hopefully it should be upgraded with GL's next version this year!
You need to make sure your database collation and tables are set to utf8mb4_general_ci or something similar.
[/p]
Yes, I make sure that collation is same. But I doubt that as you said. All of tables for the original db are not explicitly declared collation.
Also in db-config.php file make sure this is set:
$_DB_charset = 'utf8mb4';
[/p]
Ok I'll check db-config.php, but now I don't use utf8mb4 because current charset for mysqld is utf8. To make it work with utf8 charset is first priority, even though utf8mb4 charset should be globally used in blog & SNS.
Finally in the Geeklog Configuration make sure the config option:
Remove 4-byte utf-8 characters? (?)
is set to false.[/p]
OK I'll check it out.
Re: Story submission issue
Posted on: 02/04/18 09:20am
By: Laugh
That is a pretty old version. You should upgrade to the newest version as soon as you can as there are security fixes etc.
That old version doesn't have the config option "Remove 4-byte utf-8 characters?" so you don't have to worry about that.
Re: Story submission issue
Posted on: 02/05/18 04:46am
By: OMAL
Thanks.
Do you think gl_stories table is the only suspected table for this issue as to collation?
Another question is, when the submit button is clicked for story submission or draft submission, which php files are used?
Re: Story submission issue
Posted on: 02/05/18 06:55am
By: Laugh
For stories along with the story submission table but if you have comments and/or staticpages those tables should be changed. It's best just to change all the tables.
The submit story form calls submit.php. For stories it then probably calls lib-story.php along with story.class.php. I am not sure what you want to do with them... they don't really have to do with the database collation.
Re: Story submission issue
Posted on: 02/05/18 08:05am
By: OMAL
Thank you.