New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails on DBs with STRICT_TRANS_TABLES sql_mode #302

Closed
nickdaugherty opened this Issue Mar 28, 2018 · 0 comments

Comments

2 participants
@nickdaugherty
Copy link

nickdaugherty commented Mar 28, 2018

Version Information

  • WordPress: 4.9.4
  • MultilingualPress: 2.11.0

Steps to Reproduce

  1. Enable STRICT_TRANS_TABLES sql_mode - something like SET GLOBAL sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
  2. Activate MLP

What I Expected

The schema + languages to be installed correctly

What Happened Instead

WordPress database error Field 'custom_name' doesn't have a default value for query made by Mlp_Db_Installer::insert_default

This is because custom_name is NOT NULL with no default, here:

'custom_name' => 'tinytext NOT NULL',

But the installer does not provide custom_name values for any of the pre-installed languages:

'aa' => array(
'english_name' => 'Afar',
'native_name' => 'Afaraf',
'is_rtl' => 0,
'iso_639_1' => 'aa',
'iso_639_2' => 'aar',
'wp_locale' => '',
'http_name' => 'aa',
'priority' => 1,
),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment