Zen Cart Logo
Forums / General Questions / ADMIN - Customers Errors

ADMIN - Customers Errors

Locked

Views: 1,626

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
1 Jul 2008, 3:29 AM
#1
cheeky_chino avatar

cheeky_chino

New Zenner

Join Date:
Sep 2004
Location:
Australia
Posts:
17
Plugin Contributions:
0

ADMIN - Customers Errors

Hi Guys,

Im getting these customer errors in the admin after my site upgrade.

I think I went from 2.4 or something to the lastest version.

Errors:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in admin/customers.php on line 1099

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in admin/customers.php on line 1101

Warning: reset() [function.reset]: Passed variable is not an array or object in admin/includes/classes/object_info.php on line 29

Warning: Variable passed to each() is not an array or object in admin/includes/classes/object_info.php on line 30

Im not sure if this would have created a problem but to get the existing customers over i just exported from the old DB to the new one.

How do i fix this?

EDIT:
Also getting these errors when editing a customer:
Warning: reset() [function.reset]: Passed variable is not an array or object in admin/includes/classes/object_info.php on line 29

Warning: Variable passed to each() is not an array or object in admin/includes/classes/object_info.php on line 30

Chino

1 Jul 2008, 3:37 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: ADMIN - Customers Errors

That is typically a result of bad data. The data which comprises a "customer" comes from several tables. Those errors typically appear when one or more of those tables is empty or does not contain the expected record for the selected customer.

A proper upgrade of a Zen Cart site uses the /zc_install/index.php script to do convert the old database to the new structure. You can find the details of the upgrade process in the upgrade documentation which came with your version of Zen Cart.
It's important to use the upgrade program because it not only preserves the data, but also handles upgrading the database structure.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Jul 2008, 3:48 AM
#3
cheeky_chino avatar

cheeky_chino

New Zenner

Join Date:
Sep 2004
Location:
Australia
Posts:
17
Plugin Contributions:
0

Re: ADMIN - Customers Errors

Could you advise me which tables are linked to the customers table?

1 Jul 2008, 5:14 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: ADMIN - Customers Errors

Cheeky Chino:

Could you advise me which tables are linked to the customers table?

Yes, the link I posted in my previous post explains that.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jul 2008, 4:57 AM
#5
cheeky_chino avatar

cheeky_chino

New Zenner

Join Date:
Sep 2004
Location:
Australia
Posts:
17
Plugin Contributions:
0

Re: ADMIN - Customers Errors

DrByte:

Yes, the link I posted in my previous post explains that.

Yes i clicked through your link, and i didn't really help with my situation.

It doesnt say what tables etc are exactly upgraded changed etc, it's just saying that you should run the upgrade wizard etc...

7 Jul 2008, 6:31 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: ADMIN - Customers Errors

DrByte:

That is typically a result of bad data. The data which comprises a "customer" comes from several tables. Those errors typically appear when one or more of those tables is empty or does not contain the expected record for the selected customer.

Cheeky Chino:

Could you advise me which tables are linked to the customers table?

Cheeky Chino:

Yes i clicked through your link, and i didn't really help with my situation.
The link I posted specifically answers your question about "which tables are linked to the customers table".

DrByte:

A proper upgrade of a Zen Cart site uses the /zc_install/index.php script to do convert the old database to the new structure. You can find the details of the upgrade process in the upgrade documentation which came with your version of Zen Cart.
It's important to use the upgrade program because it not only preserves the data, but also handles upgrading the database structure.
Cheeky Chino:

It doesnt say what tables etc are exactly upgraded changed etc, it's just saying that you should run the upgrade wizard etc...
The correct way to upgrade your database structure is to use the supplied upgrade script. It takes all of 5-10 minutes. Maybe 15 including backups.

The documented upgrade instructions are written and supplied not just to take up disk space, but to provide a plan which will prevent you from having the problems you're reporting.

So, since it seems you are bent on using a new database and merging data, instead of upgrading the original one, you'll need to:

  1. Upgrade your "old" database using the supplied zc_install upgrade script.
  2. Then import the tables related to customer-data.
    That way you'll have the data in the right format.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

11 Aug 2008, 2:49 PM
#7
thebeveragegourmet avatar

thebeveragegourmet

Zen Follower

Join Date:
Nov 2006
Posts:
163
Plugin Contributions:
0

Re: ADMIN - Customers Errors

I went into Customers thru Admin this morning to edit a customers address and couldn't do a thing. The following errors were showing:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in **
/admin/customers.php** on line 1020

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in **
/admin/customers.php** on line 1022

Warning: reset() [function.reset]: Passed variable is not an array or object in **
/admin/includes/classes/object_info.php** on line 29

Warning: Variable passed to each() is not an array or object in **
/admin/includes/classes/object_info.php** on line **30

**I have NOT upgraded. In fact, up until a week ago, this was working fine and I haven't done any tweaking/changes in that timeframe. I have tried taking the original install files and transferring them over but that didn't work. I'm not sure what happened...


11 Aug 2008, 7:46 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: ADMIN - Customers Errors

thebeveragegourmet:

I am getting similar errors:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in **
/admin/customers.php** on line 1020

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in **
/admin/customers.php** on line 1022

Warning: reset() [function.reset]: Passed variable is not an array or object in **
/admin/includes/classes/object_info.php** on line 29

Warning: Variable passed to each() is not an array or object in **
/admin/includes/classes/object_info.php** on line **30

**I have NOT upgraded. In fact, up until a week ago, this was working fine and I haven't done any tweaking/changes in that timeframe. I have tried taking the original install files and transferring them over but that didn't work. I'm not sure what happened...
The cause is the same ... you have bad data for some reason:
DrByte:

That is typically a result of bad data. The data which comprises a "customer" comes from several tables. Those errors typically appear when one or more of those tables is empty or does not contain the expected record for the selected customer.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.