modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.35k stars 527 forks source link

Force/check database/tables/fields encoding is using UTF8 #13197

Open Jako opened 7 years ago

Jako commented 7 years ago

Summary

The installer should check (if thats possible) that the database/tables/fields are using UTF8 and force the usage of UTF8.

Step to reproduce

No specific steps.

Observed behavior

During an update from a more or less ancient MODX version the database update code does not run through causing missing fields in the DB. Also the wrong encoding could cause empty JSON results in the system connectors.

Environment

No specific version.

OptimusCrime commented 7 years ago

Why? What about those who would like to use utf8mb4 instead? It's another encoding as far as the database knows.

My five cents is that this is up to the developer/adminstrators to handle, not something MODX should enforce in any way.

Jako commented 7 years ago

I meant all UTF8 collation types with this.

At the moment the update has i.e. issues when modifying columns with a FULLTEXT index that have different charsets assigned. This often occurs on old installations when the database/tables uses latin1 collations. It would be nice, if MODX helps to solve those charset issues before upgrading the database fields.

wuuti commented 6 years ago

The check could also be included in the manager config checks...