Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where courses can be published without filling in all required fields when WPML is enabled. This problem does not occur when WPML is disabled.
Solution:
We recommend updating Advanced Custom Fields (ACF) to the latest version as a similar issue with field validation was resolved in that update. You can find more information on this update here: Advanced Custom Fields conflicts with field validation on AJAX requests.
Additionally, it is not necessary to translate custom fields groups with ACFML. Therefore, you can set ACF custom fields to be not-translatable in WPML->Settings->Post types translations, which allows you to manage fields from one place rather than two. For more details on managing ACF with WPML, visit: Translate sites built with ACF.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 4 replies, has 3 voices.

Last updated by Shekhar Bhandari 2 months ago.

Assisted by: Shekhar Bhandari.

Author Posts
September 6, 2024 at 2:26 pm #16149391

patrickV-3

Background of the issue:
We have a custom post type setup called Courses which has custom fields setup on it. Our client notified us that you can publish courses without filling in all of the required fields. Specifically, you only need to fill in the capacity and spots left field and it allows you to publish the course. Here's a loom which demonstrates the issue: hidden link. I've reached out to Advanced Custom Field support and found when doing a conflict test that the issue occurs when I enable WPML. If we disable WPML then it works as expected.

Symptoms:
Able to publish courses without filling in all required fields when WPML is enabled.

Questions:
Why does enabling WPML allow publishing courses without filling in all required fields?
How can we ensure all required fields must be filled before publishing when WPML is enabled?

September 6, 2024 at 5:11 pm #16149973

Laura
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hi,

thanks for contacting us.

In your debug information I can't see String Translation and ACFML. You can't translate ACF fields without them.

September 10, 2024 at 6:52 pm #16163243

patrickV-3

WPML String Translation is installed so I'm not sure why it isn't showing up in the debug information. We don't normally have any issues translating ACF fields so we usually don't install ACFML. Would installing it fix the issues we're seeing with fields not being required?

September 11, 2024 at 4:34 am #16164042

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

If ACF is used to create those fields, ACFML is a required glue plugin to make it work, can you enable ACFML and see if it helps?

Further, if the problem exists, To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

September 13, 2024 at 4:15 am #16173851

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

A similar issue with validation was solved with the latest version of ACF, so can you update the ACF to the latest version?

https://wpml.org/errata/advanced-custom-fields-conflicts-with-field-validation-on-ajax-requests/

Further, there is no need to translate custom fields groups with ACFML, so you can go to WPML->Settings->Post types translations and set ACF custom fields to be not-translatable, you can hide the translated field groups. I recommend this as it's easier to control fields from one place rather then two place.
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

Let me know if this helps.

Thanks

September 13, 2024 at 4:44 pm #16177028

patrickV-3

Updating to the latest version of ACF fixed the issue.