- Posts: 193
- Thank you received: 76
Custom field error - field "0" not secured
11 years 10 months ago #179545
by korzo
Custom field error - field "0" not secured was created by korzo
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- Error-message(debug-mod must be tuned on) -- : field "0" not secured
There is an error "field "0" not secured" when trying to save custom field with "Display limited to" set to custom field of type with multiple choices.
How to reproduce:
- Create product custom field with field type Checkbox or Multiple Dropdown
- Create second product custom field, save it and then set "Display limited to" to custom field from step 1, set at least 1 value and save it.
Problem is in the file administrator\components\com_hikashop\classes\field.php on line 1019.
For field types Checkbox and Multiple Dropdown $value is indexed array, therefore $id is 0 and call to
hikashop_secureField() with integer argument results in die().
Here is var_dump($fieldOptions) for field type dropdown
and var_dump($fieldOptions, $value) for field type Checkbox.
-- Joomla version -- : 3.3.6
-- Error-message(debug-mod must be tuned on) -- : field "0" not secured
There is an error "field "0" not secured" when trying to save custom field with "Display limited to" set to custom field of type with multiple choices.
How to reproduce:
- Create product custom field with field type Checkbox or Multiple Dropdown
- Create second product custom field, save it and then set "Display limited to" to custom field from step 1, set at least 1 value and save it.
Problem is in the file administrator\components\com_hikashop\classes\field.php on line 1019.
For field types Checkbox and Multiple Dropdown $value is indexed array, therefore $id is 0 and call to
hikashop_secureField() with integer argument results in die().
Here is var_dump($fieldOptions) for field type dropdown
and var_dump($fieldOptions, $value) for field type Checkbox.
Please Log in or Create an account to join the conversation.
11 years 10 months ago #179646
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom field error - field "0" not secured
Hi,
Thanks for the report.
For the moment I fixed the value thanks to
I'll talk with Nicolas in order to get his opinion.
Regards,
Thanks for the report.
For the moment I fixed the value thanks to
Code:
$fieldOptions = JRequest::getVar('field_options', array(), '', 'array');
foreach($fieldOptions as $column => $value) {
if(is_array($value)) {
foreach($value as $id => $val) {
if($column != 'parent_value')
hikashop_secureField($id);
$fieldOptions[$column][$id] = strip_tags($val);
}
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
11 years 8 months ago - 11 years 8 months ago #185323
by ila.qs.ad
Replied by ila.qs.ad on topic Custom field error - field "0" not secured
Excuse me Jerome, I have the same problem with custom field. My question is: did you add this code or changed some other part of code?
Tks!
Tks!
Last edit: 11 years 8 months ago by ila.qs.ad.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #185329
by korzo
Replied by korzo on topic Custom field error - field "0" not secured
What is your version?
Issue I reported was fixed in later release of Hikashop 2.3.4.
Issue I reported was fixed in later release of Hikashop 2.3.4.
Please Log in or Create an account to join the conversation.
11 years 8 months ago #185333
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Custom field error - field "0" not secured
Hi,
That's right Korzo, the fix has been added by Nicolas into HikaShop 2.3.4 and is still present in HikaShop 2.3.5
Regards,
That's right Korzo, the fix has been added by Nicolas into HikaShop 2.3.4 and is still present in HikaShop 2.3.5
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
10 years 10 months ago #221968
by globalcpe
Replied by globalcpe on topic Custom field error - field "0" not secured
I have found this problem has resurfaced in HikaShop Business 2.6.0 [1511171458] and using Joomla 3.4.5 What kind of fix or workaround can you suggest please.
My site is currently in development and I am trying to build the event registration form and attach the product for the number of days at the conference and I am recieving this error just like its described above in the previous posts.
My site is currently in development and I am trying to build the event registration form and attach the product for the number of days at the conference and I am recieving this error just like its described above in the previous posts.
Please Log in or Create an account to join the conversation.
10 years 10 months ago #221972
by nicolas
Replied by nicolas on topic Custom field error - field "0" not secured
Hi,
How did you configure your custom fields ?
Could you provide screenshots of their settings ?
Could you give a link to the registration page so that we could reproduce the problem on your website ?
How did you configure your custom fields ?
Could you provide screenshots of their settings ?
Could you give a link to the registration page so that we could reproduce the problem on your website ?
Please Log in or Create an account to join the conversation.
10 years 1 month ago #248580
by bigArman
Replied by bigArman on topic Custom field error - field "0" not secured
HikaShop Business 2.6.3 [1608060803]
Joomla! Version Joomla! 3.6.2 Stable
I'm getting the following message when saving custom filed type entry, with multi and or single drop down menus - "field "0" not secured". Is there a fix for this?
Thanks
Joomla! Version Joomla! 3.6.2 Stable
I'm getting the following message when saving custom filed type entry, with multi and or single drop down menus - "field "0" not secured". Is there a fix for this?
Thanks
Please Log in or Create an account to join the conversation.
10 years 3 days ago #251291
by nicolas
Replied by nicolas on topic Custom field error - field "0" not secured
Hi,
Please update to the latest version and try again.
If you still have the issue please provide some screenshots of the problem.
Please update to the latest version and try again.
If you still have the issue please provide some screenshots of the problem.
Please Log in or Create an account to join the conversation.
Time to create page: 0.194 seconds