Jump to content

CC cant see products in shop.


towersecurity

Recommended Posts

When CC stopped working with the following message, we were recommended to update CC to the latest version.

 

Notice: `name` is not allowed as a key in 'CubeCart_config' table! in /home/camfield/public_html/classes/db/database.class.php on line 794.

 

I tried this but the setup failed and the host realised it was their problem which they then sorted out.

 

So, I re-ran the setup and it all worked perfectly and the shop worked as usual.

 

Later the same thing happened with a similar message.

 

When the server came back the second time the shop only showed the main categories.

But When I go to the shop admin and PHP admin, I can see all the data is there.

 

The host has confirmed that the data is intact and has run the process to repair the database.

All categories and products are green ticked as visible (0 in data table)

 

I followed a suggestion in the forums to "show empty categories" and now I can see subcatogories but still no products.

Still no products showing in the shop, still they are visible in admin.

 

The host says they've done everything and it must be a CC problem.

 

I'm going to try restoring to the old version and work back to the latest version.

 

Has anyone got any other sugestions?

 

Many Thanks.

 

 

Link to comment
Share on other sites

Welcome towersecurity! Glad to see you made it to the forums.

 

Please view the Products page in your admin section. The main Product Inventory list will show all products, and under the name of each product, in tiny print, will be the name of that product's main category.

 

Are there any categories shown for the products as I have described it?

 

Then, bring up an item for editing. On the Categories tab, there should be one row ticked in the Primary column, and one or more rows ticked in the Additional column. Is this as I described it?

 

Back at the main Product Inventory list, view the Assign to Category tab. This is a quick way to assign products to categories.

Link to comment
Share on other sites

This error message:

Notice: `name` is not allowed as a key in 'CubeCart_config' table!

when it relates to the config table, means CubeCart is communicating with the database (technically, with the PHP database connectoid, and the connectid communicates with the database server), but the database is answering with nothing. Thus, when CubeCart asks for a list of the columns of a database table, to compare against the columns that a query is about to make, and the database replies with nothing, CubeCart will say that column-X does not exist (not an allowed key).

 

Well, the column does exist, it's just that the database server replied with what is essentially "I can neither confirm or deny that any columns exists in the database."

 

This problem is a technical issue with the database - particularly with the communications between the server running PHP (and your CubeCart) and the server running the database. It is really not an issue caused by CubeCart of any version.

 

My thoughts on how the associations could have been lost: just CubeCart cleared the CubeCart_category_index table to re-populate it with new product/category assignments, the comms channel to the database or the database itself went TU. That's just a wild guess.

Link to comment
Share on other sites

Seems right - the problems on the server somethings happened but no-one can trace it.

 

Just tried the " main Product Inventory list, view the Assign to Category tab"

This seems to assign an additional category, not the primary. - it then doesn't show the category agaist the product in the product list.

Is this how it should work? or am I missing something?.

Link to comment
Share on other sites

Your observation seems to be valid. The Assign to Category tab may only allow for assigning to secondary categories, with no provision for "assuming" any one category to the primary category.

 

You say that there is none of these categories appearing against a given product in the Product Inventory list. What do you see when you bring that product up for editing, on the Categories tab?

Link to comment
Share on other sites

In your hosting control panel (cPanel? Plesk?), there will be a tool that will let you view the database directly. It is called phpMyAdmin

 

Please use phpMyAdmin to view the contents of the table CubeCart_category_index.

 

Are there lots and lots of records in this table? A bunch? A few? None?

Link to comment
Share on other sites

In the product list there's just the product name - no category until you set the primary cat.

In the product / categories - no boxes are ticked, either primary or secondary.

 

after assigning a cat as sugested, only secondary cats are set.

 

cpanel

There are nearly 700 products and about 60 categories (including main and upts 3 sublevels)

 

it's going to be a horrible job to reset them manually.

 

Stupidly (forgetfully) I didn't do a backup of the database before I did the update, only the program files.

The most recent db backup is about a month old, but no new products have been added, just maybe 50 sales.

 

Is it going to be possible to restore the old database (cc v5.2.3) and then increment the more recent sales form the current version?

Link to comment
Share on other sites

sorry having a bad day. Just re read your last post.

CubeCart_category_index. contains only 11 records.

 

I'm assuming these relate the records we've been trying to set categories since your first post.

only 3 in the primary field are set at 1 - the 3 we just set.


But - if I can extract this file from my previous DB backup and install it here.

 

Not sure how to do this - advise would be welcome.

Link to comment
Share on other sites

OK - had an Idea and tried this:

 

backed up the current database

Set up a blank database & imported the previous back up

dropped all tables except the category_index.

exported the database.

went to the live CC database and imported the new file.

 

Not sure if i did it the best way - but it looks as if it worked.

Just need to test to see if anything else is missing but it looks OK at the moment.

 

Thanks for your help and pointers.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...