I'm on the latest version of CS-Cart (which I think is 4.11.1 SP1). Front end of the site seems to be fine, but when I try to log into the admin backend I get a big red sign that says SERVICE UNAVAILABLE.
Does anyone know why this is happened and how to fix?
Thanks in advance.
For a quick check and fix, please feel free to contact us here .
Thank you. I tried it on a different browser and it is now working. Not sure what the problem was.
If you face the problem again, just check page source code to see error message (Ctrl + U) or use code inspector of your browser
Don't use ctl-U since that will reload the page and you might loose the context of the error. Instead, right-click the page and select 'inspect'. You should then be able to look at the page source for the error without reloading the page.
OK this happened again and when I do an inspect, this is what I get:
Tygh\Exceptions\AException
Message
Duplicate column name ‘am_subscribe’ (1060)ALTER TABLE cscart_users
ADD am_subscribe
char(1) NOT NULL DEFAULT ‘Y’
Error at
app/Tygh/Database/Connection.php, line: 1127
Backtrace
File:app/Tygh/Database/Connection.php
Line:491
Function:throwError
File:app/functions/fn.database.php
Line:133
Function:query
File:app/addons/auto_mail/func.php
Line:694
Function:db_query
File:app/addons/auto_mail/upgrade/post_upgrade_all_versions.php
Line:295
Function:am_check_table_fields
File:app/addons/ez_common/lib/upgrade_common.php
Line:614
Function:include
File:app/addons/ez_common/lib/auth_processing.php
Line:85
Function:addon_upgrade
File:app/addons/auto_mail/controllers/backend/auth.post.php
Line:36
Function:include
File:app/functions/fn.control.php
Line:679
Function:include
File:app/functions/fn.control.php
Line:430
Function:fn_run_controller
File:adminxxxxxxxx.php
Line:27
Function:fn_dispatch
thetool
December 3, 2019, 12:00am
#7
3rd party auto mail addon. For some reason it is trying to add an already existing column. Contact developer.
Look like addon from EZ Merchant Solutions
Good catch. It can happen during an automatic upgrade of the addon.
If you want a fix before the next release, you can change the app/addons/auto_mail/func.php file at about line 614 from
db_query("ALTER TABLE `?:users` ADD `am_subscribe` char(1) NOT NULL DEFAULT 'Y'");
to
$fields = fn_get_table_fields('users');
if( !in_array('am_subscribe', $fields)
db_query("ALTER TABLE `?:users` ADD `am_subscribe` char(1) NOT NULL DEFAULT 'Y'");