Welcome to Geeklog Sunday, August 19 2018 @ 06:57 pm EDT

Geeklog Forums

Story submission issue


OMAL

Anonymous
cold
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.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1299
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.
One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 50
Thanks Laugh.
Quote by: Laugh

Are 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.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1299
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.
One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 50
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?

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1299
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.
One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Chatty
Registered: 06/12/17
Posts: 50
Thank you.

All times are EDT. The time is now 06:57 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content