Forums / Setting Up Categories, Products, Attributes / Can't update existing products or add new ones

Can't update existing products or add new ones

Views: 3,284

Results 1 to 15 of 15
14 Mar 2014, 12:38 PM
#1
eldridge avatar

eldridge

New Zenner

Join Date:
Mar 2014
Posts:
20
Plugin Contributions:
0

Can't update existing products or add new ones

debug file in Zencart/cache just says:

[14-Mar-2014 06:46:21] PHP Warning: reset() [<a href='function.reset'>function.reset</a>]: Passed variable is not an array or object in /home2/XXX/public_html/zencart/admin/includes/classes/object_info.php on line 29
[14-Mar-2014 06:46:21] PHP Warning: Variable passed to each() is not an array or object in /home2/XXX/public_html/zencart/admin/includes/classes/object_info.php on line 30

It's been a long time since I made any changes to the Catalog so I'm not sure what information is supposed to show when I hit the Preview button but for a new item, it shows no title, no picture and no price and says I haven''t entered a quantity so it will default to 1. If I continue by hitting Insert it displays the error: ERROR: The data you submitted was found to be empty. YOUR CHANGES HAVE NOT BEEN SAVED. You may have a problem with your browser or your internet connection.

Updating an existing product does not produce an error but also doesn't make any updates to the product.

Also, when I hit the Update or Insert button it takes me to the Admin home page instead of back to the catalog. The same thing happens if I hit the Back button instead of Insert or Update.

14 Mar 2014, 3:46 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Can't update existing products or add new ones

Eldridge:

debug file in Zencart/cache just says:[14-Mar-2014 06:46:21] PHP Warning: reset() [function.reset]: Passed variable is not an array or object in /home2/XXX/public_html/zencart/admin/includes/classes/object_info.php on line 29[14-Mar-2014 06:46:21] PHP Warning: Variable passed to each() is not an array or object in /home2/XXX/public_html/zencart/admin/includes/classes/object_info.php on line 30It's been a long time since I made any changes to the Catalog so I'm not sure what information is supposed to show when I hit the Preview button but for a new item, it shows no title, no picture and no price and says I haven''t entered a quantity so it will default to 1. If I continue by hitting Insert it displays the error: ERROR: The data you submitted was found to be empty. YOUR CHANGES HAVE NOT BEEN SAVED. You may have a problem with your browser or your internet connection. Updating an existing product does not produce an error but also doesn't make any updates to the product.Also, when I hit the Update or Insert button it takes me to the Admin home page instead of back to the catalog. The same thing happens if I hit the Back button instead of Insert or Update.Has your server's php version been updated? (Whether you were aware of it or not) the other thing would be to compare the files to a known good version of it to ensure that it hasn't been modified without your knowledge.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 Mar 2014, 7:46 AM
#3
eldridge avatar

eldridge

New Zenner

Join Date:
Mar 2014
Posts:
20
Plugin Contributions:
0

Re: Can't update existing products or add new ones

mc12345678:

...the other thing would be to compare the files to a known good version of it to ensure that it hasn't been modified without your knowledge.

Hi thanks for the reply. Which files are you suggesting I compare?

19 Mar 2014, 9:26 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Can't update existing products or add new ones

Eldridge:

Hi thanks for the reply. Which files are you suggesting I compare?

Btw, sorry for not responding sooner. I had hoped I might be able to identify specific files, but on retrospect, the below is what I suggest.

I would do a blanket comparison of the admin files to a fresh version of ZC. Certainly would be good to upgrade also, but if you're going to keep the current version then want it to run properly.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

20 Mar 2014, 9:22 AM
#5
eldridge avatar

eldridge

New Zenner

Join Date:
Mar 2014
Posts:
20
Plugin Contributions:
0

Re: Can't update existing products or add new ones

I think I'd like to do an upgrade anyway and it might fix it.

I'll look into whats involved in the upgrade. Thanks for you help

20 Mar 2014, 9:37 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Can't update existing products or add new ones

Eldridge:

I think I'd like to do an upgrade anyway and it might fix it.

I'll look into whats involved in the upgrade. Thanks for you help

Please understand that while you are having some difficulties with performing operations onur existing data, do your upgrade independent of your active site. Follow the directions for upgrading a ZC site, do not try to take shortcuts.

Basic preupgrade things to know: what plugins are currently installed, what custom mods have been made. Then: do you need (not want but need) them in your new version? Are they available for the new version? Then begin the upgrade process. Again setup the new site independent of your existing so you can continue selling there, while workingonur new gorgeous functioning site. :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

26 Mar 2014, 12:07 PM
#7
eldridge avatar

eldridge

New Zenner

Join Date:
Mar 2014
Posts:
20
Plugin Contributions:
0

Re: Can't update existing products or add new ones

Did the upgrade to 1.5.1 but it did not fix the problem. Still can't add new products to the catalog. Get same error message.

Going to do a completely clean install and try with the Demo products

27 Mar 2014, 7:46 AM
#8
eldridge avatar

eldridge

New Zenner

Join Date:
Mar 2014
Posts:
20
Plugin Contributions:
0

Re: Can't update existing products or add new ones

Brand new installation of 1.5.1 worked!! Without trying to use a copy of my shop database or copy over any files.

So I think it's something in either using my old database or copying over the configure.php files that is stuffing up the Admin side

27 Mar 2014, 8:27 AM
#9
eldridge avatar

eldridge

New Zenner

Join Date:
Mar 2014
Posts:
20
Plugin Contributions:
0

Re: Can't update existing products or add new ones

Dropped all the tables from the new database and replaced them with the tables from an earlier database that had (supposedly) been upgraded to 1.5.1 and now nothing works. The store does not even load. Just get a WARNING: An Error occurred, please refresh the page and try again.

I'm just going to reinstall 1.5.1 and build the shop new from scratch. The upgrade process is just way too complicated for my poor brain :blush:

27 Mar 2014, 9:22 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Can't update existing products or add new ones

Eldridge:

Dropped all the tables from the new database and replaced them with the tables from an earlier database that had (supposedly) been upgraded to 1.5.1 and now nothing works. The store does not even load. Just get a WARNING: An Error occurred, please refresh the page and try again.

I'm just going to reinstall 1.5.1 and build the shop new from scratch. The upgrade process is just way too complicated for my poor brain :blush:

So when you upload the database files, if you run the install again (choosing to only update the database), that would convert the data to 1.5.1, and really that should be done with the backup that was made of the 1.3.9h database.
There's also some tools that could help with export and import of the products. It can take a really long time to populate the product information from scratch.

Easy populate is one of those tools.

Unfortunately while the instructions may seem complex, they work and it is the most direct way for them to work 100% of the time.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

27 Mar 2014, 4:18 PM
#11
eldridge avatar

eldridge

New Zenner

Join Date:
Mar 2014
Posts:
20
Plugin Contributions:
0

Re: Can't update existing products or add new ones

Replaced the database with the one from the 1.3.9h shop and ran the Database Upgrade (put back the zc_install folder and ran it). Once it's finished and I go into Admin to maintain the catalogue, I get the original error message.

Basically it either doesn't like the fact that I replaced the Database or it doesn't like that I used the old configure.php files (more likely I think)

I'm pretty sure I have followed the upgrade instructions correctly at least once in the five attempts I've made.

What I've done in the most recent attempt is a bit different to the instructions but I was trying to make sure first that the vanilla install of Zen Cart would work:

  1. Fresh upload of 1.5.1 files

  2. Create brand new database

  3. Run zc_install, taking the Install option and taking the option to include Demo data

  4. Rename admin and zc_install folders

  5. test Admin function and use it to add new product to catalogue and maintain existing one. Everything works fine

  6. Maintain Database, dropping all tables

  7. Import tables from exported 1.3.9h database

  8. copy configure.php files over from existing 1.3.9h installation

  9. maintain configure.php files to have the new path names in all the relevant spots

  10. rename zc_install back to original name

  11. run zc_install and take the option to Upgrade Database

  12. rename zc_install back again

  13. log into Admin and try to maintain catalogue. Doesn't work

UPDATE: Finally got it to work! Copying over the configure.php from the old installation to the new (even though I was editing the various paths) was what was breaking it. This time I used the existing 1.5.1 configure.php files and it worked.

Feeling confident now, I'm going to do another complete upgrade just to make sure that I understand exactly the steps.

27 Mar 2014, 10:18 PM
#12
eldridge avatar

eldridge

New Zenner

Join Date:
Mar 2014
Posts:
20
Plugin Contributions:
0

Re: Can't update existing products or add new ones

OK here are my steps to a hassle free update of Zen Cart:

Step 1. Upload the 1.5.1 files to the server
Step 2. Create a new empty database
Step 3. Run ZC Install.
Step 4. Export your old database
Step 5. Drop all existing tables from new database and load up the 1.3.9h database
Step 6. Run Install and take Database Upgrade option
Step 7. Rename your admin folder. Delete your zc_install folder

At this point you have a new vanilla installation of Zen Cart using your old database but without any of your images or formatting. You still have to do the file comparisons and copy over those files where you have made changes, images etc.

Why do so many of the Upgrade guides tell you to copy over your configure.php files from your old to your new installation? That is what was breaking it for me.

27 Mar 2014, 11:01 PM
#13
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Can't update existing products or add new ones

Eldridge:

OK here are my steps to a hassle free update of Zen Cart:

Step 1. Upload the 1.5.1 files to the server
Step 2. Create a new empty database
Step 3. Run ZC Install.
Step 4. Export your old database
Step 5. Drop all existing tables from new database and load up the 1.3.9h database
Step 6. Run Install and take Database Upgrade option
Step 7. Rename your admin folder. Delete your zc_install folder

At this point you have a new vanilla installation of Zen Cart using your old database but without any of your images or formatting. You still have to do the file comparisons and copy over those files where you have made changes, images etc.

Why do so many of the Upgrade guides tell you to copy over your configure.php files from your old to your new installation? That is what was breaking it for me.

So, I don't know what "many" upgrade guides gave you that direction, but:
http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading
And
http://www.zen-cart.com/content.php?148-how-do-i-upgrade-my-zen-cart-site

Do not, unless in the upgrade method the new includes/configure.php doesn't exist, which it should if followed the direction of the prepare section.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

28 Mar 2014, 12:59 AM
#14
eldridge avatar

eldridge

New Zenner

Join Date:
Mar 2014
Posts:
20
Plugin Contributions:
0

Re: Can't update existing products or add new ones

Yes reading over that guide that you posted the link to again (and this one http://www.zen-cart.com/content.php?140) I think what was happening is that I was getting confused and doing some sort of hybrid version of an upgrade process. (as I have read in many posts now that a lot of people do and come unstuck just as I did)

The language was totally unfamiliar to me initially and I had to keep jumping around to find articles on how to do each step: create a new database, export tables, import tables etc.

It really is a simple process when you are familiar with it but it seemed very complex to a newbie like myself. I can now do the base upgrade (without the file comparison and copy over step) in about 5 minutes without referring to a guide. But a week ago it was "how do I create a new database?" "where is this phpMyAdmin thing?" "huh?! what? HUH!?"

Thank you very much for your patience. I know I've been spamming this post with my endless updates. :blush:

28 Mar 2014, 1:19 AM
#15
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Can't update existing products or add new ones

Eldridge:

Yes reading over that guide that you posted the link to again (and this one http://www.zen-cart.com/content.php?140) I think what was happening is that I was getting confused and doing some sort of hybrid version of an upgrade process. (as I have read in many posts now that a lot of people do and come unstuck just as I did)

The language was totally unfamiliar to me initially and I had to keep jumping around to find articles on how to do each step: create a new database, export tables, import tables etc.

It really is a simple process when you are familiar with it but it seemed very complex to a newbie like myself. I can now do the base upgrade (without the file comparison and copy over step) in about 5 minutes without referring to a guide. But a week ago it was "how do I create a new database?" "where is this phpMyAdmin thing?" "huh?! what? HUH!?"

Thank you very much for your patience. I know I've been spamming this post with my endless updates. :blush:

Thankfully what you call spamming this post is really just providing updates of current status and lessons learned. I'm sure it will help someone if nothing else maybe more likely to show up higher in searches. :)

Yeah, there can be a lot of little things to learn about and generally speaking you won't have to do much of that for a while, but you might be surprised about how many other things make more sense now that you have learned what you have. :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...