Forums
I'm running Opigno on Ubuntu 16.04 with Mysql 5.7 and PHP7.0. Generally running pretty good.
But when I upgrade to Opigno 1.29 or 1.30 your upgrade process forces the upgrade of the login_history module from 7.x-1.0 to 7.x-1.1. This newer version of login_history module is known to be broken with mysql 5.7---see:
https://www.drupal.org/project/login_history/issues/2944461
If a person is running mysql 5.7 and upgrades to Opigno 1.29 or later, as mentioned above they receive the error:
Failed: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL....etc.
........the new login_history module is trying to write some new columns in the db in a way which is illegal in mysql 5.7 or later.
Getting a scary message and module upgrade failure is one thing, but then with the login_history module broken, LOGINS BY NON-ADMINS FAIL. Visitors can't log in to the site.
I was able to temporarily disable opigno_stats and login_history [dependency] modules and replace the login_history module files found in "var/www/profiles/opigno_lms/modules/contrib' with the files from the older login_history 7.x-1.0 module, re-enable login_history and opigno_stats modules and it seems to be working fine again with the Opigno 1.30 version.
It might be good to allow us to choose the option to update modules during an opigno version upgrade instead of forcing it on us. Also, I wonder if you guys have encountered this problem---or if everyone is running old versions of linux and mysql?
Perhaps I'm missing something and there is an easier way of dealing with this? I'm not very interested in running old versions of things. The default mysql for Ubuntu 16.04 is 5.7 and it's not really very new any more.
This is a known issue with
This is a known issue with Drupal 7 and MySQL 5.7
Try to apply this patch, it should fix the issue:
https://www.drupal.org/files/issues/D7-2615496-68.patch
In reply to This is a known issue with by axel
I tried that patch and got burnt hash
In reply to I tried that patch and got burnt hash by boyd.badten
Hello,
Hello,
Yes I applied this patch, it worked like a charm.
The messages you get are strange.
Instead of applying the patch, you can try doing a manual change in your database to avoid the alter query being blocked
In reply to Hello, by axel
Cannot update to Opigno 1.31--Drupal 7.59 HELP!
H boyd.badten,
H boyd.badten,
Its not rocket science really. Drupal has an issue adding a primary key to an existing db programatically with the specific version of mysql you are using.
Either you apply the patch to drupal that fixes that issue, allowing the login_history module to update or you comment that code inside the update function of the login_history and manually do the changes to the db.
If you dont want to do any of the above simply replace the login_history with the older version so that everything is updated except that specific module.
If you think no one on your staff is capable of doing any of these 3 procedures, we are more than glad to help you out. https://www.opigno.org/en/professional-services/professional-support
Best regards