Zen Cart Logo
Forums / Upgrading to 1.5.x / WARNING: An Error occurred, please refresh the page and try again.

WARNING: An Error occurred, please refresh the page and try again.

Locked

Views: 2,262

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
15 Mar 2016, 2:37 AM
#1
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

WARNING: An Error occurred, please refresh the page and try again.

I was upgrading a 1.5.1 install to 1.5.4
Imported the DB
Did the DB upgrade fine

Store page displays this text at the bottom

WARNING: An Error occurred, please refresh the page and try again.

Trying to access the admin area I get this

WARNING: An Error occurred, please refresh the page and try again.
The resulting debug file contents are
[14-Mar-2016 21:18:35 America/Chicago] PHP Fatal error: 1062:Duplicate entry '0' for key 'PRIMARY' :: insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address, gzpost, flagged, attention, severity, logmessage) values (now(), '0', 'login.php ', 'camefrom=index.php', 'my_ip_address', '‹Ž\0', '0', '', 'info', 'Accessed page [login.php]') ==> (as called by) /home/kobrawd/public_html/demo154/mt_admin/includes/functions/database.php on line 53 <== in /home/kobrawd/public_html/demo154/includes/classes/db/mysql/query_factory.php on line 155

Php V = 5.5.31
mysql = 5.5.48

15 Mar 2016, 2:50 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: WARNING: An Error occurred, please refresh the page and try again.

In a normal configuration, the admin_activity_log table has its primary key set to be the log_id field, which is an auto-incrementing integer field.
It seems yours is not properly set to be auto-incrementing, for whatever reason.

15 Mar 2016, 3:07 AM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: WARNING: An Error occurred, please refresh the page and try again.

DrByte,
Thank You
I ran this and can now access

ALTER TABLE admin_activity_log CHANGE COLUMN   log_id  log_id int(15) NOT NULL auto_increment;
15 Mar 2016, 3:24 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: WARNING: An Error occurred, please refresh the page and try again.

My bad. I should have said big-integer field.

The upgrade SQL (since v150) is:

ALTER TABLE admin_activity_log CHANGE COLUMN log_id log_id bigint(15) NOT NULL auto_increment;