Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Default Passed variable is not an array or object in customers after upgrading

    I stuffed up my db and did a fresh install and imported my old data. In my admin however, I get the below errors up top when I look at the customer details and the customer fields are blank. I can enter data but they remain blank. On the webpage side, everything seems fine. I can log in to my account and all the details are there. The version is had was 1.3.0 and now is 1.3.0.2, so im guessing something was changed in relation to this.

    Does anyone know specifically what changes I need to make to fix it?



    "Warning: reset(): Passed variable is not an array or object in /usr/local/psa/home/vhosts/royalgems.co.nz/httpdocs/admin/includes/classes/object_info.php on line 29

    Warning: Variable passed to each() is not an array or object in /usr/local/psa/home/vhosts/royalgems.co.nz/httpdocs/admin/includes/classes/object_info.php on line 30"

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Passed variable is not an array or object in customers after upgrading

    It would seem that perhaps your customer data-tables may not be in sync with each other. Did you encounter any errors while importing?


    Tables in question are:
    - customers
    - customers_info
    - address_book
    .

    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.

  3. #3

    Default Re: Passed variable is not an array or object in customers after upgrading

    I had someone else do the import so I'm not sure. He didn't mention anything and doesn't know why the error has occured, so I'm guessing the answer is no.

    Is there anyway to bring them in line with the current version?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Passed variable is not an array or object in customers after upgrading

    First you need to find out whether they're intact or not.

    1. How many records are there in those tables?

    2. What happens if you run this query via phpMyAdmin?
    How many records do you get?
    Do you get any errors?
    Code:
    select c.customers_id, c.customers_gender, c.customers_firstname,
                                              c.customers_lastname, c.customers_dob, c.customers_email_address,
                                              a.entry_company, a.entry_street_address, a.entry_suburb,
                                              a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id,
                                              a.entry_country_id, c.customers_telephone, c.customers_fax,
                                              c.customers_newsletter, c.customers_default_address_id,
                                              c.customers_email_format, c.customers_group_pricing,
                                              c.customers_authorization, c.customers_referral
                                      from customers c left join address_book a
                                      on c.customers_default_address_id = a.address_book_id
                                      where a.customers_id = c.customers_id;
    Last edited by DrByte; 9 Oct 2006 at 04:24 AM. Reason: fix typo
    .

    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.

  5. #5

    Default Re: Passed variable is not an array or object in customers after upgrading

    I ran that query and got the below error.

    #1064 - 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 '" . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a
    ' at line 9
    From that I figure that customers and address book are the 2 tables having issues. Heres a pic of customers which has 15 rows. Address book has 13 rows
    Attached Images Attached Images  
    Last edited by royalgemsnz; 9 Oct 2006 at 03:59 AM.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Passed variable is not an array or object in customers after upgrading

    oops -- I was talking to someone when I posted that query, and left some PHP code in it. I've edited it for you to try again.
    .

    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. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Passed variable is not an array or object in customers after upgrading

    From that I figure that customers and address book are the 2 tables having issues.
    As I mentioned before, there are 3 tables which work in tandem:

    Quote Originally Posted by DrByte View Post
    It would seem that perhaps your customer data-tables may not be in sync with each other. Did you encounter any errors while importing?


    Tables in question are:
    - customers
    - customers_info
    - address_book
    .

    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.

  8. #8

    Default Re: Passed variable is not an array or object in customers after upgrading

    Hmmm. I ran it again and didn't have any errors.

  9. #9
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,144
    Plugin Contributions
    11

    Default Re: Passed variable is not an array or object in customers after upgrading

    Chris,
    I'll start with the fact that I got in this mess in the middle.
    Client had 4 music CDs with 2 entered as music and 2 as general. The client moved 2 generals to music by changing product type.
    Cart and admin seem to work well but the two moved from general to music give the error in this thread when trying to edit in categories.
    Suggestions?

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Passed variable is not an array or object in customers after upgrading

    Product Types like Product General and Product Music use different database tables ...

    They really are not interchangeable ...

    You would need to check all the tables and make sure the proper records exist for the 2 Product General products that were manually switched to Product Music ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Warning: Variable passed to each() is not an array or object
    By caprimia in forum General Questions
    Replies: 2
    Last Post: 1 Feb 2013, 06:16 AM
  2. Replies: 4
    Last Post: 23 Jan 2010, 09:35 PM
  3. Replies: 4
    Last Post: 1 May 2009, 06:47 AM
  4. Variable passed to each() is not an array or object in
    By wareagletsf in forum Basic Configuration
    Replies: 2
    Last Post: 13 Mar 2008, 10:32 AM
  5. Replies: 2
    Last Post: 22 Jan 2007, 12:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR