? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
11 Mar 2016

Summary of Changes

Creating a user with PDO MySQL will fail because of an invalid default value for the lastResetTime column.

Testing Instructions

With the MySQL PDO database driver, in the User Manager attempt to create a new user. Saving should fail with a SQL error because of an invalid value for the lastResetTime column. With patch applied it should work.

avatar mbabker mbabker - open - 11 Mar 2016
avatar mbabker mbabker - change - 11 Mar 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Mar 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 11 Mar 2016

I can not confirm the issue just as I cannot confirm the issue at #9310

Database Version 5.5.42
Database Collation utf8mb4_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 5.6.10


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9380.

avatar brianteeman brianteeman - change - 11 Mar 2016
Category SQL
avatar 810
810 - comment - 11 Mar 2016

It still fails for me.

Maybe this is the same issue: #9310
During install i get that error, but when i do ctrl + f5 then i get the success page.
But only the admin account isn't in the database

avatar mbabker
mbabker - comment - 11 Mar 2016

This has nothing to do with the install error. Yes it in part probably plays into the lack of changing sql_mode in the PDO driver, but if that were the specific issue, I'd not be able to do anything with my MySQL 5.6 setup similar to your 5.7 setup.

The specific error this fixes is Save failed with the following error: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '' for column 'lastResetTime' at row 1. http://cl.ly/3X0Y1p043P2S shows I'm not nuts.

avatar andrepereiradasilva
andrepereiradasilva - comment - 11 Mar 2016

ok, you're not nuts :smile:, but i can't reproduce it, so i can't test.

Database Version 5.5.5-10.0.24-MariaDB
Database Collation utf8_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 5.6.18

avatar 810
810 - comment - 11 Mar 2016

Ok i think i found it, maybe because pdo doesn't work with utf8mb4

avatar brianteeman
brianteeman - comment - 11 Mar 2016

Ok i think i found it, maybe because pdo doesn't work with utf8mb4

Cant be that

avatar 810
810 - comment - 11 Mar 2016

mhh i tested first utf8 , and deleted it again, then with mb4 now its working. mmhh

avatar mbabker
mbabker - comment - 11 Mar 2016

If it were mb4 related I wouldn't have gotten it to install. Seriously, I ran a fresh install last night. I swear I'm not running any hacks locally on core and my MySQL setup is whatever the DMG from their website gives.

avatar 810
810 - comment - 11 Mar 2016

mysql 5.7.9

  • utf8 = success
  • utf8mb4 = success

mysql 5.7.11

  • utf8 = failed
  • utf8mb4 = failed

I will test later

avatar 810
810 - comment - 11 Mar 2016

ok the issue was sql_mode. It was a conflict with old to new mysql and phpmyadmin. I changed it on the php.ini. But it wasn't showed correct on the phpmyadmin settings.

The Fix above. I also can't confirm. For me the user is saved correct, no errors

avatar andrepereiradasilva andrepereiradasilva - test_item - 13 Mar 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 13 Mar 2016

I have tested this item :white_check_mark: successfully on 0261ba2

As said i can't reproduce this, but looking at the code diff this PR makes sense as we now have the exactly the same behavior as lastvisitDate


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9380.

avatar andrepereiradasilva
andrepereiradasilva - comment - 17 Mar 2016

Added default sql_mode for mysql 5.6.6+ (sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION';) and has able to reproduce the error.

image

avatar wilsonge
wilsonge - comment - 20 Mar 2016

Merged on code reivew

avatar wilsonge wilsonge - close - 20 Mar 2016
avatar wilsonge wilsonge - merge - 20 Mar 2016
avatar wilsonge wilsonge - change - 20 Mar 2016
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-03-20 18:20:51
Closed_By wilsonge

Add a Comment

Login with GitHub to post a comment