Forums / General Questions / Field List

Field List

Results 1 to 12 of 12
29 Jun 2015, 01:38
#1
wwwd avatar

wwwd

Inactive

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

Field List

Per the following error, it looks like there is a column missing from "field List" but I cannot find the file. I have verified that the column does exist, it just looks like it is not pointing correctly.

[28-Jun-2015 21:11:55 EST5EDT] [client 64.7.70.206 ] PHP Fatal error: 1054:Unknown column 'm.manufacturers_name' in 'field list' :: SELECT DISTINCT p.products_image, m.manufacturers_name, p.products_quantity, p.products_id, p.products_type, p.master_categories_id,
p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1,
s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price,
p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping,
p.products_qty_box_status FROM cy6s_products p LEFT JOIN cy6s_specials s on p.products_id = s.products_id LEFT JOIN cy6s_products_description pd on p.products_id = pd.products_id JOIN cy6s_products_to_categories p2c on p.products_id = p2c.products_id WHERE p.products_status = 1
and pd.language_id = '1'

Where is this "Field List" found, developer tools hasn't helped.
29 Jun 2015, 02:01
#2
lruskauff avatar

lruskauff

Totally Zenned

Join Date:
Sep 2008
Posts:
559
Plugin Contributions:
0

Re: Field List

Hi
Can you please post a link to y our website and answer some of the questions in the posting tips.
Thanks
Lin
29 Jun 2015, 04:32
#3
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Posts:
6,263
Plugin Contributions:
3

Re: Field List

WWWD:

Per the following error, it looks like there is a column missing from "field List" but I cannot find the file.


When did this problem start?

What addons have you installed (or tried to install) that would have coincided with the start of the problem?

What other info can you provide that may give us a clue?

I can't tell you much at the moment other than "field List" isn't to be found in any of the stock zencart code (V154).
Furthermore, a code search for where "p.products_image" is followed by "m.manufacturers_name" as part of a search query is nowhere to be found either.

Ergo, my conclusion is that you have an add-on module that is causing the error.

Cheers
RodG
29 Jun 2015, 06:30
#4
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Posts:
2,862
Plugin Contributions:
5

Re: Field List

field list is not part of the code.

this is the field list :
p.products_image, m.manufacturers_name, p.products_quantity, p.products_id, p.products_type, p.master_categories_id, 
p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, 
s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, 
p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, 
p.products_qty_box_status


these are the field that are used for the sql query, and one of those fields is missing. in your case m.manufacturers_name.

I saw another post of you in the dynamic attribute filter module, but also one where you said you removed the mod. Probably you didn't remove all of the edits you made.
29 Jun 2015, 07:24
#5
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Posts:
6,263
Plugin Contributions:
3

Re: Field List

Design75:

field list is not part of the code.


Doh! Of course it isn't. I've NO idea what *I* was thinking. :blush:

Cheers
RodG
29 Jun 2015, 18:56
#6
wwwd avatar

wwwd

Inactive

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

Re: Field List

I am running ZC 1.5.4

I loaded the Variable Filter add in and have since stripped out all of the installed pages and run the uninstall sql. It appears that there is something caught in the craw of the query generator and I have no clue how to clear it.

the URL is http://scholledresses.com selecting "categories" causes the error, everything else seems to be working.
29 Jun 2015, 21:59
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Field List

If you use the Developer's Tool Kit and search for:
SELECT DISTINCT p.products_image, m.manufacturers_name, p.products_quantity,

Does anything come up for that select?

The problem with it is m.manufacturers_name cannot be pulled as that information is in the tables called but rather in the table manufacturers ...
30 Jun 2015, 02:13
#8
wwwd avatar

wwwd

Inactive

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

Re: Field List

That string does not show up anywhere in developers' tools' search.

The interesting thing is that it is only when Category is called from the side bar or drop down. If it is called from All Items, it works just fine.
30 Jun 2015, 02:16
#9
wwwd avatar

wwwd

Inactive

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

Re: Field List

I made .bak copies of every modified file before editing. I deleted the edited files and restored from the .bak files. I have not deleted the "new" files because all references to them should have been deleted when I ran the uninstal sql file; no?
30 Jun 2015, 03:21
#10
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Posts:
6,263
Plugin Contributions:
3

Re: Field List

WWWD:

I have not deleted the "new" files because all references to them should have been deleted when I ran the uninstal sql file; no?


No. not so. The uninstal.sql scripts only revert changes made to the database. It doesn't touch any 'new' files. The 'new' files need to be deleted manually. Leaving them in place could *cause* errors if they happen to be 1) automatically loaded by Zen-Cart, and 2) if they contain references to the tables/records that were removed when running the uninstall scripts.

For future reference, other can keeping the database 'tidy' there is never a need to undo/uninstall any changes made to the database by an install script. These changes, on their own, will *never cause or create a problem. The problem(s) only occur if you uninstall the SQL changes but neglect to take care of the related files.

Cheers
RodG

*never means except in extreme cases where code has been *very poorly* written and expects table records to have an explicit field count in a specific order (and no one has written code like that for years)
30 Jun 2015, 12:37
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,907
Plugin Contributions:
1

Re: Field List

Don't know from the above if the issue has been resolved, but another route of identifying the location of the errant code would be/have been to install lat9's mydebug backtrace which would have identifed the location where the sql code was run to find where that additional field pull originated.
30 Jun 2015, 14:56
#12
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Posts:
13,980
Plugin Contributions:
46

Re: Field List

mc12345678:

Don't know from the above if the issue has been resolved, but another route of identifying the location of the errant code would be/have been to install lat9's mydebug backtrace which would have identifed the location where the sql code was run to find where that additional field pull originated.

Exactly what I was about to suggest! You can download the plugin from https://www.zen-cart.com/downloads.php?do=file&id=1879. Once installed, the myDEBUG log file will "expand" its output to identify the calling-stack that resulted in the error ... the net result being that you'll know which module contains the errant line of code.