Update messed up and stuck

Hi, need your help pls…

I am not exactly sure what has happened, but I tried to upgrade from 7.11.x to the latest version and there was error I cannot remember, I played then with php on server (now 7.2.-before 7.0 ) and then hell broke loose

Oh and I deleted the language file since it was not working perfectly (still wrong adress format) - maybe that was not a clever idea?

It first seemed that Suite could not work errorfree with 7.2 (I also played with php on server too much, so needed to rescue server first, php-fpm was a complete disaster on cpanel, but thats another story) - so had to rescue server first, but now suite is partly messed up and update (I uploaded file, started process, got an error, started with server update mentioned above and now many errors and update etc disfunctional) is stuck in step “commit upgrade” [when I try to proceed it stops with “Database failure. Please refer to suitecrm.log for details.”

When I try to “Repair” I get a lot of code with "Differences found between database and vardefs

The following script will sync the database structure with the structure defined in the vardefs. You have the option of exporting this script and then running it against your database using external database management tools, or to allow the administration module to run the script. "

But when I Execute this suggested SQL commands, I am stuck with “Database failure. Please refer to suitecrm.log for details.”

In suitecrm-log I only find older errors, last one is this

Wed Jul 17 18:12:02 2019 [17873][1][FATAL] Mysqli_query failed.
Wed Jul 17 18:12:02 2019 [17873][1][FATAL] Executing repair query: Query Failed: ALTER TABLE users modify COLUMN first_name varchar(255) NULL , modify COLUMN last_name varchar(255) NULL: MySQL error 1071: Specified key was too long; max key length is 1000 bytes
Wed Jul 17 18:12:02 2019 [17873][1][FATAL] Exception handling in /home/xxxxxxx/crm/include/MVC/Controller/SugarController.php:400
Wed Jul 17 18:12:02 2019 [17873][1][FATAL] Exception in Controller: Datenbank Fehler. Bitte sehen Sie in der Datei suitecrm.log nach.
Wed Jul 17 18:12:02 2019 [17873][1][FATAL] backtrace:
#0 /home/xxxxxxx/crm/include/database/DBManager.php(353): sugar_die(‘Datenbank Fehle…’)
#1 /home/xxxxxxx/crm/include/database/DBManager.php(328): DBManager->registerError(‘Executing repai…’, ‘Executing repai…’, true)
#2 /home/xxxxxxx/crm/include/database/MysqliManager.php(179): DBManager->checkError(‘Executing repai…’, true)
#3 /home/xxxxxxx/crm/modules/Administration/repairDatabase.php(95): MysqliManager->query(‘ALTER TABLE use…’, true, ‘Executing repai…’)
#4 /home/xxxxxxx/crm/include/MVC/View/SugarView.php(834): include_once(’/home/xxxxxxx/…’)
#5 /home/xxxxxxx/crm/include/MVC/View/views/view.classic.php(72): SugarView->includeClassicFile(‘modules/Adminis…’)
#6 /home/xxxxxxx/crm/include/MVC/View/SugarView.php(226): ViewClassic->display()
#7 /home/xxxxxxx/crm/include/MVC/Controller/SugarController.php(435): SugarView->process()
#8 /home/xxxxxxx/crm/include/MVC/Controller/SugarController.php(375): SugarController->processView()
#9 /home/xxxxxxx/crm/include/MVC/SugarApplication.php(113): SugarController->execute()
#10 /home/xxxxxxx/crm/index.php(52): SugarApplication->execute()
#11 {main}

The upgradewizard.log says

"ed, 17 Jul 2019 16:01:17 +0000 [UpgradeWizard] - [At commit.php]
Wed, 17 Jul 2019 16:01:17 +0000 [UpgradeWizard] - Setting error_reporting() to E_ERROR while running upgrade
Wed, 17 Jul 2019 16:01:17 +0000 [UpgradeWizard] - Rebuilding style js file: cache/themes/SuiteP/js/style-min.js
Wed, 17 Jul 2019 16:01:17 +0000 [UpgradeWizard] - Rebuilding language cache
Wed, 17 Jul 2019 17:50:47 +0000 [UpgradeWizard] - setting session variables…
Wed, 17 Jul 2019 17:50:47 +0000 [UpgradeWizard] - [At commit.php]
Wed, 17 Jul 2019 17:50:47 +0000 [UpgradeWizard] - Setting error_reporting() to E_ERROR while running upgrade
Wed, 17 Jul 2019 17:50:47 +0000 [UpgradeWizard] - Rebuilding style js file: cache/themes/SuiteP/js/style-min.js
Wed, 17 Jul 2019 17:50:47 +0000 [UpgradeWizard] - Rebuilding language cache
Wed, 17 Jul 2019 17:50:52 +0000 [UpgradeWizard] - setting session variables…
Wed, 17 Jul 2019 17:50:52 +0000 [UpgradeWizard] - [At commit.php]
Wed, 17 Jul 2019 17:50:52 +0000 [UpgradeWizard] - Setting error_reporting() to E_ERROR while running upgrade
Wed, 17 Jul 2019 17:50:52 +0000 [UpgradeWizard] - Rebuilding style js file: cache/themes/SuiteP/js/style-min.js
Wed, 17 Jul 2019 17:50:52 +0000 [UpgradeWizard] - Rebuilding language cache
"

I can work with Suite, but no update or repair function

It seems Suite is FUBAR, no idea how to repair this…any idea?

Thx a million
Dan

This change will get you that first database problem solved:

https://github.com/salesagility/SuiteCRM/pull/7510/files

tell me what happens next.

If you deleted a language file, you probably need to replace it, unless it was only your own language customizations under “custom” dir.

1 Like

Hi pgr, as always thank you so much for your help

had to run the repair tool twice (first time same error), but 2nd time I get this

“Database tables are synced with vardefs”

So… Improvement :slight_smile:
Thank you

Ok, the rest of the issues seems to be still there…the update is still sruck in #5 and I see no way to upload langauge file again

oh, and I forgot to mention that after all this mess my pdf tool/module/report file is also broken

But am glad I see some light now
againTHANK YOU!

forgot to post the error message I see in the upgrade module:

Warning: Invalid argument supplied for foreach() in /home/xxxxxxx/crm/modules/UpgradeWizard/commit.php on line 640

thx!!!

Try renaming your

upload/upgrades

folder to something else (you can delete it later if everything goes well)

Tthis is clean any left-overs from previously failed upgrades.

1 Like

wow, pgr, am making huge progress here!!!

  1. could upload language file again…only there is an older language file still shown that I cannot access to deinstall, not sure if that gives me any problems (I renamed the two folders you suggested)

  2. Seems that I am already on 7.11.6 (so update before seems to have worked

  3. only thing it seems still broken is the pdf module for my reports (self-created)

Thank you so much!
Dan

HI, all works well with pgr’s suggestions, thank you again!

Only thing still broken is the pdf “report” I created… I already redid the “file”, but when I click on “print as pdf” the “report” gets created as it used to, but any pdf viewer reports “error. Error loading the document” …the pdf generator is still broken…

any idea how I could fix that?

Thx a million

Dan

Any chance you’re using XAMPP?

How is your display_errors setting in php.ini? Make sure it is off.

1 Like

HI pgr, thank you…

hmmm, not sure…any hint how I can check that (cpanel on VPS)?

I am still fighting with some error messages, though I deactivated the error reporting on all php.ini files I could find…

but it worked before the beforementioned update crash, so in my opinion no changes in the server settings…

Thx
Dan

If your upgrade didn’t succeed, who knows what state your system is in. If an upgrade stops mid-way with an error, the best thing is to revert to a snapshot (or checkpoint, or backup) immediately, so that you’re not left in an incoherent state.

Have a look at your logs to see if you can learn something more about the PDF problem…

Hi pgr, thank you!

am afraid that is not really possible…I do have older snapshots, but since the basic system was working a lot of information has been added within a few days of the failure (and admin was on vacation)
so a lot of knowledge would get lost :frowning:

Thank you
Dan