Upgrade to AbanteCart 1.4.2 Fails with SQL Syntax Error on DROP INDEX

Started by Ali Arslan, June 27, 2025, 04:22:46 AM

Previous topic - Next topic

Ali Arslan

Hello,

While attempting to upgrade the core from version 1.4.1 to 1.4.2, we are encountering a critical SQL syntax error during the upgrade process. The upgrade consistently fails with the following error logged:

SQL-ERROR: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `ab_lang_definition_idx` ON `ab_language_definitions`' at line 1"
The error is being triggered from:

/core/lib/package_manager.php on line 832

This suggests that the upgrade process is executing a DROP INDEX IF EXISTS statement, which appears to be incompatible with the current MySQL server version.

Request for Support:
Could the team or anyone from the community kindly advise:

Where exactly this DROP INDEX IF EXISTS statement is being generated from during the upgrade?

If this is a known issue in the 1.4.2 upgrade package?

Recommended approach to prevent this SQL error and complete the upgrade successfully?

Looking forward to any guidance or a possible patch from the core team.

abolabo

what version of mysql-server do you use?
https://github.com/abantecart/abantecart-src/blob/master/public_html/composer.json#L28

(see cpanel->phpMyAdmin -> server info)
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Ali Arslan


Ali Arslan

Thank you for the response earlier.

Just following up on this issue regarding the failed upgrade to v1.4.2 due to the DROP INDEX IF EXISTS syntax. As mentioned, our MySQL server version is 8.0.38, which supports this syntax  yet the upgrade still fails with the SQL error referencing:

DROP INDEX IF EXISTS `ab_lang_definition_idx` ON `ab_language_definitions`

abolabo

Quote from: Ali Arslan on June 27, 2025, 09:31:33 AM
Thank you for the response earlier.

Just following up on this issue regarding the failed upgrade to v1.4.2 due to the DROP INDEX IF EXISTS syntax. As mentioned, our MySQL server version is 8.0.38, which supports this syntax  yet the upgrade still fails with the SQL error referencing:

DROP INDEX IF EXISTS `ab_lang_definition_idx` ON `ab_language_definitions`

1. open phpMyAdmin and run this queries:
create index `ab_lang_definition_idx` on `ab_language_definitions` (language_value(500));


create index `ab_settings_idx` on `ab_settings` (value(500));


2. run upgrade process in admin with key abantecart_upgrade_142
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Forum Rules Code of conduct
AbanteCart.com 2010 -