Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default MySQL error after attribute change

    I don't know if it's the right place to ask but each time I add a size attribute to a product, I end with the following error message :

    1054 Unknown column 'c.parent_id' in 'on clause'
    in:
    [SELECT c.categories_id as id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName FROM categories c, categories_description cd LEFT JOIN categories_description cd2 ON c.parent_id=cd2.categories_id AND cd2.language_id='1' WHERE c.categories_id=cd.categories_id AND cd.language_id='1']


    I've tried both product priced by attribute and not, and it's the same result, adding attributes completly breaks the site. Same when using no prefix.

    Can someone tell me what's happening, I'm waiting to sort out this issue to change my live site. I made categories for sizes but it does not make sense and add a step in the order process. I'd like the size to be an attribute, i.e.
    Pizza individual 10$
    Pizza medium 12$
    Pizza large 14 $

    I already have two attributes working : crust (dropdown regular/Whole wheat) and toppings that you can add by checkbox (each topping is a different price for each pizza size), but that as been setup before upgrades.

    Will I be able to setup toppings prices to 0.8 for a small, 1.4 for a medium and 1.6 for a large pizza ? Or would it be better to stay with sizes as categories ?

    Thanks for help

    regards

    Hubert

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

    Default Re: MySQL error after attribute change

    Are you using some kind of Add-On?

    What version of Zen Cart are you running?
    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!

  3. #3
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default Re: MySQL error after attribute change

    I'm using 1.3.7 and for the add ons....A few ones yes....Let me think.
    -Admin profiles,
    -Printable Pricelist,
    -SEO Urls (but not activated),
    -Sales report (wich doesn't work cause I didn't finish to set it up),
    I'm on MySQL 5.0.18-standard and PHP4 or 5 doesn't make any difference.

    I think that's all

    Oh another clue, I tried to Edit an already setup attribute and it doesn't break anything...Strange
    Hubert

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

    Default Re: MySQL error after attribute change

    Go to your Tools ... Developer's Tool Kit ...

    In the bottom input box type in:
    pName

    Select Catalog/Admin from the dropdown and click Search ...

    What files come up?
    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!

  5. #5
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default Re: MySQL error after attribute change

    Here is the result on my test site


    Searching 1742 files ... for: pName

    /Users/vartan/Sites/piccolo/admin/popup_image.php

    Line #53 : if (navigator.appName == 'Netscape') i = 40;

    /Users/vartan/Sites/piccolo/includes/classes/seo.url.php

    Line #555 : $sql = "SELECT products_name as pName

    Line #561 : $pName = $this->strip($result->fields['pName']);

    Line #562 : $this->cache['PRODUCTS'][$pID] = $pName;

    Line #563 : $return = $pName;

    Line #589 : $sql = "SELECT c.categories_id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName

    Line #599 : $cName = $this->not_null($result->fields['pName']) ? $result->fields['pName'] . ' ' . $result->fields['cName'] : $result->fields['cName'];

    Line #910 : $sql = "SELECT c.categories_id as id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName

    Line #928 : $name = $this->not_null($category->fields['pName']) ? $category->fields['pName'] . ' ' . $category->fields['cName'] : $category->fields['cName'];

    /Users/vartan/Sites/piccolo/includes/modules/pages/info_paypal/jscript_main.php

    Line #25 : if (navigator.appName == 'Netscape') i=10;

    /Users/vartan/Sites/piccolo/includes/modules/pages/popup_coupon_help/jscript_main.php

    Line #25 : if (navigator.appName == 'Netscape') i=10;

    /Users/vartan/Sites/piccolo/includes/modules/pages/popup_cvv_help/jscript_main.php

    Line #25 : if (navigator.appName == 'Netscape') i=40;

    /Users/vartan/Sites/piccolo/includes/modules/pages/popup_image/jscript_main.php

    Line #15 : // if (navigator.appName == 'Netscape') i=20;

    /Users/vartan/Sites/piccolo/includes/modules/pages/popup_image_additional/jscript_main.php

    Line #15 : // if (navigator.appName == 'Netscape') i=20;

    /Users/vartan/Sites/piccolo/includes/modules/pages/popup_search_help/jscript_main.php

    Line #25 : if (navigator.appName == 'Netscape') i=40;

    /Users/vartan/Sites/piccolo/includes/modules/pages/popup_shipping_estimator/jscript_main.php

    Line #25 : if (navigator.appName == 'Netscape') i=10;

    /Users/vartan/Sites/piccolo/includes/modules/payment/linkpoint_api/class.linkpoint_api.php

    Line #579 : if (isset($pdata["appname"]))

    Line #580 : $xml .= "<appname>" . $pdata["appname"] . "</appname>";

    Match Lines found: 18

    Seems to be the same answer on the live site :


    Searching 1723 files ... for: pName

    /home/cozicate/public_html/piccolo_html/catalog/includes/classes/seo.url.php

    Line #555 : $sql = "SELECT products_name as pName

    Line #561 : $pName = $this->strip($result->fields['pName']);

    Line #562 : $this->cache['PRODUCTS'][$pID] = $pName;

    Line #563 : $return = $pName;

    Line #589 : $sql = "SELECT c.categories_id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName

    Line #599 : $cName = $this->not_null($result->fields['pName']) ? $result->fields['pName'] . ' ' . $result->fields['cName'] : $result->fields['cName'];

    Line #910 : $sql = "SELECT c.categories_id as id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName

    Line #928 : $name = $this->not_null($category->fields['pName']) ? $category->fields['pName'] . ' ' . $category->fields['cName'] : $category->fields['cName'];

    /home/cozicate/public_html/piccolo_html/catalog/includes/modules/pages/info_paypal/jscript_main.php

    Line #25 : if (navigator.appName == 'Netscape') i=10;

    /home/cozicate/public_html/piccolo_html/catalog/includes/modules/pages/popup_coupon_help/jscript_main.php

    Line #25 : if (navigator.appName == 'Netscape') i=10;

    /home/cozicate/public_html/piccolo_html/catalog/includes/modules/pages/popup_cvv_help/jscript_main.php

    Line #25 : if (navigator.appName == 'Netscape') i=40;

    /home/cozicate/public_html/piccolo_html/catalog/includes/modules/pages/popup_image/jscript_main.php

    Line #15 : // if (navigator.appName == 'Netscape') i=20;

    /home/cozicate/public_html/piccolo_html/catalog/includes/modules/pages/popup_image_additional/jscript_main.php

    Line #15 : // if (navigator.appName == 'Netscape') i=20;

    /home/cozicate/public_html/piccolo_html/catalog/includes/modules/pages/popup_search_help/jscript_main.php

    Line #25 : if (navigator.appName == 'Netscape') i=40;

    /home/cozicate/public_html/piccolo_html/catalog/includes/modules/pages/popup_shipping_estimator/jscript_main.php

    Line #25 : if (navigator.appName == 'Netscape') i=10;

    /home/cozicate/public_html/piccolo_html/catalog/includes/modules/payment/linkpoint_api/class.linkpoint_api.php

    Line #579 : if (isset($pdata["appname"]))

    Line #580 : $xml .= "<appname>" . $pdata["appname"] . "</appname>";

    /home/cozicate/public_html/piccolo_html/catalog/patron/popup_image.php

    Line #53 : if (navigator.appName == 'Netscape') i = 40;

    Match Lines found: 18


    Do that mean I will get the same result ?

    Other question, pName seems to only be in SEO url wich is installed but disabled...

    Thanks for your help

    Hubert

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

    Default Re: MySQL error after attribute change

    It would appear that while turned off it has changed files in some manner that it is being called and causing errors ...

    You might look to see if it contains files that it has overwritten or see if you can find what is calling: seo.url.php

    This appears to be called from something associated with the attributes and causing this error ...

    But as it is not part of Zen Cart ... I really don't know off hand what file(s) might be affected by it ...
    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!

  7. #7
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default Re: MySQL error after attribute change

    That was also killing my install after an product image update. I dig into the files and found that
    /includes/functions/html_output.php
    was calling seo.url.php
    I replaced it with a brand fresh file from the distrib files
    , but that was not this one or at least not only.

    I took the habit, when I install an add-on or make a mod to rename the original files to write in the name what mod or add-on it was before. Thanks to that I found that
    /admin/categories.php
    and
    /admin/products.php
    were involved, so I replaced these two files also.

    The image update is no more breaking the site. I still didn't try the attributes updates (I was so happy to tell you your help was succesfull), but I'll make some test and let you know. Thank you very much.

    Hubert

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

    Default Re: MySQL error after attribute change

    Thanks for the update! Hope this solves all of your problems ...
    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!

  9. #9
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default Re: MySQL error after attribute change

    You're great !

    That was it ! SEO url was killing everything on 1.3.7.

    Many thanks for you're great help.

    Hubert

 

 

Similar Threads

  1. Bulk change default attribute in mySQL?
    By RandyRand in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 21 Apr 2011, 11:38 PM
  2. After host change, mysql backup giving error 1045
    By canemasters in forum General Questions
    Replies: 12
    Last Post: 25 May 2008, 08:18 PM
  3. 1064 Error in displaying MYSQL data after creating custom table
    By qwerpoiu338 in forum General Questions
    Replies: 2
    Last Post: 15 Jan 2008, 04:44 AM
  4. Error after MySQL Import
    By paults in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 27 May 2007, 05:22 AM
  5. MySQL error message after importing database
    By Ken Joy in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 4 Mar 2007, 08:14 PM

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