Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Unchanged, Stable Site Suddenly Broken

Unchanged, Stable Site Suddenly Broken

Views: 752

Results 1 to 3 of 3
7 Feb 2014, 3:46 AM
#1
wwwd avatar

wwwd

Inactive

Join Date:
Nov 2012
Posts:
100
Plugin Contributions:
0

Unchanged, Stable Site Suddenly Broken

I have not made changes to the files for at least six months. Lastnight, a guest let me know my cart wasn't working. I tried uploading my archive copy from six months ago, which did not resolve the problem.

This is the error entry. It looks like there is a bad query:

[06-Feb-2014 20:14:14] PHP Fatal error: 1054:Unknown column 'c.categories_status' in 'where clause' :: select c.categories_id, cd.categories_name from categories c, categories_description cd where c.categories_id=cd.categories_id and c.parent_id= '0' and cd.language_id='1' and c.categories_status='1' order by c.sort_order, cd.categories_name in /big/dom/xwhatwouldwaltdo/www/Secure_Server/pages/pins/includes/classes/db/mysql/query_factory.php on line 219

Any ideas?

Line 219-233:
$zp_db_resource = @$this->query($zf_sql, $this->link);
if (!$zp_db_resource) {
if (@mysql_errno($this->link) == 2006) {
$this->link = FALSE;
$this->connect($this->host, $this->user, $this->password, $this->database, $this->pConnect, $this->real);
$zp_db_resource = @mysql_query($zf_sql, $this->link);
}
if (!$zp_db_resource) {
$this->set_error(@mysql_errno($this->link),@mysql_error($this->link));
}
}
if(!is_resource($zp_db_resource)){
$obj = null;
return true;
}

7 Feb 2014, 5:18 AM
#2
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Unchanged, Stable Site Suddenly Broken

First does categories_status exist in the database?

  • look in table categories

Next search your local site for this:

select c.categories_id, cd.categories_name from categories c, categories_description cd where c.categories_id=cd.categories_id and c.parent_id= '0' and cd.language_id='1' and** c.categories_status='1' ** order by c.sort_order, cd.categories_name

to find the files that may be part of the problem...

7 Feb 2014, 1:30 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,089
Plugin Contributions:
56

Re: Unchanged, Stable Site Suddenly Broken

The problem is not your files, it's your database. The categories_status field is a standard column within the categories table.