Re: Admin Customer Details - No Edit Button
Quote:
Originally Posted by
Spinach
I hope this is the part of the log you requested.
[28-Nov-2022 11:15:26 UTC] Request URI: /zc_Test/admin/index.php?cmd=configuration&gID=5, IP address: 58.6.171.68
I have a friend trying to help me and she has found if we put the new empty database back, the edit button appears in the Customer Details in the Configuration in Admin. Then if we import my current database to the new version of Zen Cart, the edit button vanishes from the Customers Details in Admin. The strange thing is all the other pages in Configuration have edit buttons. So I'd guess something in my database is breaking that edit button.
My friend is now trying to work out why my imported database is causing this issue. I've never had this database problem upgrading before.
Again, thanks for your help.
Yes, that helps. From the log you posted above, it appeared that (for whatever reason) your database's "Create Account Default Country" was an empty string instead of a numeric value and I reproduced the error you posted by changing my test site's value to an empty string!
You can correct your issue by going to the admin's Tools :: Install SQL Patches and entering the following to set that country default to Australia:
Code:
UPDATE configuration SET configuration_value = '13' WHERE configuration_key = 'SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY' LIMIT 1;
P.S. I have no idea how that empty value has worked for so long!
Re: Admin Customer Details - No Edit Button
I can't remember the exact version of Zen Cart we started with. Our shop has been online 19 years and I guess we started using Zen Cart for about 17 years now.
On the live store, I am running Zen Cart Version 1.5.7d.
On what I'm calling the 'Test store', I am upgrading to version 1.5.8.
After importing the live store database into the 'test store' database, I ran Zen Cart install to upgrade the database. I have the following error log:
cmd=configuration&gID=5, IP address: 58.6.171.68
--> PHP Fatal error: Uncaught TypeError: Argument 1 passed to zen_get_countries() must be of the type int, string given, called in /home/www/xxx.com/xxxx/includes/functions/functions_addresses.php on line 100 and defined in /home/www/xxxx.com/xxxx/includes/functions/functions_addresses.php:50
As already stated, the edit button is missing in 'customer details' on the 'test store' after importing the live site database, but all other edit buttons are there in admin.
On the live site in 'customer details' the edit button is there, and there are no errors on the 'live store'.
Thank you again for any help.
Re: Admin Customer Details - No Edit Button
Ran into the same problem on a current upgrade from 1.5.1 to 1.5.8.
The solution for the countries problem is:
BACKUP
Dump a sql of the countries table created by the zc_install for 1.5.8 ( you can pull it out of the mysql_zencart.sql starting at line 408 thru 419 for the table design.)
Delete the countries table brought in from the old database
Insert the table and data created by the 1.5.8
run zc_install to update.
OR.... If your database has a prefix
- Using phpMyAdmin, open the 1.5.8 created table in phpMyAdmin
- click on Export in the top Menu Bar
- Choose the Custom Export Method
- Select Structure and Data for the countries table
- Choose your desired Output (It should be set for Save)
- Scroll down and Click on the go button
- Make sure the Old database has been imported to your site
- Open your admin >> Tools >> Install SQL Patches
- Choose File gto bring in your saved countries table
- Click on Upload
- Run zc_install and the database should upgrade.
did I mention....
BACKUP
Re: Admin Customer Details - No Edit Button
Quote:
Originally Posted by
Spinach
I can't remember the exact version of Zen Cart we started with. Our shop has been online 19 years and I guess we started using Zen Cart for about 17 years now.
On the live store, I am running Zen Cart Version 1.5.7d.
On what I'm calling the 'Test store', I am upgrading to version 1.5.8.
After importing the live store database into the 'test store' database, I ran Zen Cart install to upgrade the database. I have the following error log:
cmd=configuration&gID=5, IP address: 58.6.171.68
--> PHP Fatal error: Uncaught TypeError: Argument 1 passed to zen_get_countries() must be of the type int, string given, called in /home/www/xxx.com/xxxx/includes/functions/functions_addresses.php on line 100 and defined in /home/www/xxxx.com/xxxx/includes/functions/functions_addresses.php:50
As already stated, the edit button is missing in 'customer details' on the 'test store' after importing the live site database, but all other edit buttons are there in admin.
On the live site in 'customer details' the edit button is there, and there are no errors on the 'live store'.
Thank you again for any help.
You're not "listening"; did you try performing that "Install SQL Patches" suggestion that I posted above?
Re: Admin Customer Details - No Edit Button
Not finding where the actual 1.5.8 countries table data is inserted but you probably have a copy somewhere of what the 1.5.8 install created.
Re: Admin Customer Details - No Edit Button
Quote:
Originally Posted by
brittainmark
Did you load the database, then run zc_install to update the database? If not, that could be the issue.
She did that but it didn't fix anything.
Re: Admin Customer Details - No Edit Button
Quote:
Originally Posted by
dbltoe
Not finding where the actual 1.5.8 countries table data is inserted but you probably have a copy somewhere of what the 1.5.8 install created.
We are just about ready to give up on it. I know absolutely nothing about databases. It is all beyond me. I'm 64 years young but this is testing my patience. Thank you all, for your help.
Re: Admin Customer Details - No Edit Button
Upgrading is difficult; you might need to hire a pro to take care of this for you.
Re: Admin Customer Details - No Edit Button
Quote:
Originally Posted by
lat9
Yes, that helps. From the log you posted above, it appeared that (for whatever reason) your database's "Create Account Default Country" was an empty string instead of a numeric value and I reproduced the error you posted by changing my test site's value to an empty string!
You can correct your issue by going to the admin's Tools :: Install SQL Patches and entering the following to set that country default to Australia:
Code:
UPDATE configuration SET configuration_value = '13' WHERE configuration_key = 'SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY' LIMIT 1;
P.S. I have no idea how that empty value has worked for so long!
Quote:
Originally Posted by
Spinach
We are just about ready to give up on it. I know absolutely nothing about databases. It is all beyond me. I'm 64 years young but this is testing my patience. Thank you all, for your help.
Again, did you apply the SQL patch that I'd previously suggested?
Re: Admin Customer Details - No Edit Button
You can correct your issue by going to the admin's Tools :: Install SQL Patches and entering the following to set that country default to Australia:
Code:
UPDATE configuration SET configuration_value = '13' WHERE configuration_key = 'SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY' LIMIT 1;
My friend just tried the above code and it worked!
We want to thank you all for your help it really was appreciated.