Page 2 of 3

Re: Customer Custom Fields not available in admin & not saving

Posted: Thu Apr 12, 2018 4:02 am
by webs_bd
I don't know lots about this side of things but under 'Structure' the collation shows as:
utf8_general_ci

Type shows as:
MyISAM

Not sure if it matters but under 'Operations' collations shows as:
latin1_swedish_ci

Re: Customer Custom Fields not available in admin & not saving

Posted: Thu Apr 12, 2018 4:07 am
by straightlight
Are you able to add other values than the custom fields in the OC admin or in the store-front end on the product's page where the reviews are?

Re: Customer Custom Fields not available in admin & not saving

Posted: Thu Apr 12, 2018 4:45 am
by webs_bd
I don't have reviews on the site. What other values do you mean that I could edit?

Re: Customer Custom Fields not available in admin & not saving

Posted: Thu Apr 12, 2018 4:46 am
by straightlight
It could be about saving your settings in your admin - > systems - > settings - > edit settings page. Are you able to save your settings after modifying them?

Re: Customer Custom Fields not available in admin & not saving

Posted: Thu Apr 12, 2018 5:15 am
by webs_bd
I see. Yes I can edit settings no problem.

Re: Customer Custom Fields not available in admin & not saving

Posted: Thu Apr 12, 2018 5:41 am
by straightlight
What are your current settings for your admin custom fields?

Re: Customer Custom Fields not available in admin & not saving

Posted: Thu Apr 12, 2018 5:59 am
by webs_bd
http://test.bigdecision.co.uk/cf1.jpg
I just have this one field set up - see screenshot

Re: Customer Custom Fields not available in admin & not saving

Posted: Thu Apr 12, 2018 6:06 am
by straightlight
I did noticed the difference this week for the mis-validation of the regex option when the text type is selected. To rectify the situation, see if by replacing your admin/controller/customer/custom_field.php file with this one: https://github.com/opencart/opencart/bl ... _field.php will resolved the issue.

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 5:56 pm
by webs_bd
Thanks.
No unfortunately still not working.
I get directed to the "Success: Your account has been successfully updated." However value is not retained when I go back into 'Edit Account' and the field does not show at all in the admin.

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 6:45 pm
by straightlight
Since the new created field uses customer groups, are you trying this new field as a registered customer? Did you added any regex in the textbox before submitting the new field? More information is needed.

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 6:52 pm
by webs_bd
Yes - am testing as a registered customer.
No regex was added to the new field.

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 6:59 pm
by straightlight
Set a regex to the new custom field and see if that resolves the issue. However, the added code into the controller should have validated the regex field already when the regex validation returns empty ...

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 7:20 pm
by webs_bd
Not sure if this helps but when I added regex I got error:
Notice: Undefined index: required in /home/********/public_html/admin/controller/customer/custom_field.php on line 445

(value still not saving)

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 7:22 pm
by straightlight
What is the error on line 445 of that file? More information is needed.

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 7:33 pm
by webs_bd
Sure.
Where would I get more details about the error?

line 445
if ($custom_field_customer_group['required']) {

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 7:35 pm
by straightlight
It looks like something went wrong during the last insertion of your custom field on your database table. To make sure, can you confirm if the required field name is on your custom_field_customer_group table?

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 9:16 pm
by webs_bd
No its not showing on there. I assume it should be?

I did a search for 'vat' (as this was part of the field name) in the database - it shows in custom_field_description but not in custom_field
http://test.bigdecision.co.uk/v1.jpg
Is this expected behaviour?

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 11:38 pm
by straightlight
Yes, it should. This means you are missing fields on your database due to a possible failed fresh installation / upgrade process.

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 11:42 pm
by webs_bd
OK thanks for your help.
Should I try again or do I need to try and get to bottom of why this has happened?

Re: Customer Custom Fields not available in admin & not saving

Posted: Mon Apr 16, 2018 11:44 pm
by straightlight
If a fresh installation, you could always try again on a separate folder to your server noticing if the same issue can be reproduced. If it's about an upgrade, I would suggest to restore your backup to its prior state and to create a new service request in the Commercial Support section of the forum to get this done as a custom job.