Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 09:42 am EST

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

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
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.
 Quote

Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
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.
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
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.
 Quote

Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
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?
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
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.
 Quote

Status: offline

OMAL

Forum User
Regular Poster
Registered: 12/06/17
Posts: 107
Thank you.
 Quote

All times are EST. The time is now 09:42 am.

  • 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