PDA

View Full Version : [Configuration] Error in Customer Extra Field



arnabnaha
03-10-2013, 04:07 AM
Hi..
Was just checking out the new release of oscmax and went to customers->Customers Extra Field in the administration pages. I found this error there:

1060 - Duplicate column name 'fields_input_type'

elect count(*) as total from (select ce.fields_id, ce.fields_size, ce.fields_input_type, ce.fields_input_value, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_cef_cg_hide from extra_fields ce, extra_fields_info cei where cei.fields_id=ce.fields_id and cei.languages_id =1) AS derivedtable1

[TEP STOP]

please help....

pgmarshall
03-10-2013, 12:08 PM
Apologies - I thought we had found all of these ... can believe I missed this one!

Easy fix:

Open catalog/admin/customers_extra_fields.php

Change line 127 from:

$fields_query_raw = "select ce.fields_id, ce.fields_size, ce.fields_input_type, ce.fields_input_value, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_input_type, ce.fields_cef_cg_hide from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where cei.fields_id=ce.fields_id and cei.languages_id =" . (int)$languages_id;

to

$fields_query_raw = "select ce.fields_id, ce.fields_size, ce.fields_input_type, ce.fields_input_value, ce.fields_required_status, cei.fields_name, ce.fields_status, ce.fields_cef_cg_hide from " . TABLE_EXTRA_FIELDS . " ce, " . TABLE_EXTRA_FIELDS_INFO . " cei where cei.fields_id=ce.fields_id and cei.languages_id =" . (int)$languages_id;

ie. remove the second ce.fields_input_type from the query

Code fix: https://code.google.com/p/oscmax2/source/detail?r=1962

Regards,

tcshadow
11-24-2013, 08:16 PM
Bug is still present in 2.5.3 but the fix posted here works