Error: The <<fieldname>> field is invalid when posting a new Ad from translated site
I get this error: Error: The <<fieldname>> field is invalid. when trying to submit a new ad.
The problem occurs only if a field value from a checkbox or radio button is translated.
I use ACF for Classipress Version 2.3.8, Classipress v. 3.4 and WPML latest versions.
Steps to reproduce:
1. Create a new field with two checkboxes (value1, value2)
2. Insert the field in the Ad fields
3. using WPML, translate 'value1' to 'valeur1'
4. Post a new ad and select 'valeur1'
5. ERROR: Error: The <<fieldname>> field is invalid.
6. Try a non translated value 'value2' --> It works
The problem comes apparently from a Classipress Theme file. I found a first workaround which might not be the right thing to do but it suppresses the unwanted message:
- Source file where the error comes from: /themes/classipress/includes/views-checkout.php
- Workaround: Commented line (866): // $errors->add( 'invalid-' . $field->field_name, sprintf( __( 'Error: The "%s" field is invalid.', APP_TD ), translate( $field->field_label, APP_TD ) ) );
Please advise how this error should be properly fixed.