Skip Navigation

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.

This topic contains 8 replies, has 2 voices.

Last updated by Andreas W. 1 month, 2 weeks ago.

Assigned support staff: Andreas W..

Author Posts
May 27, 2021 at 6:51 am #8856895

amyL-11

Notice: Undefined index: wpml_cf_preferences when enabling the ACF local json option

May 29, 2021 at 5:29 am #8872203

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I would like to try to recreate the reported issue but I do sadly only have ACF Pro 5.9.5 available at the moment.

Could you please install the latest version on the following test-site and leave me a short notice?

One-Click-Login:
hidden link

Further, if you find the time to try to recreate the issue here it would be highly appreciated. You might need to use the File Manager plugin in order to access the server.

Best regards
Andreas

June 4, 2021 at 9:47 pm #8919455

amyL-11

OK - doing it now....

June 4, 2021 at 9:57 pm #8919489

amyL-11

Done - also imported my ACF settings. Trying to trigger a sync json option, but not being able to I can't show you the issue.

Do you know how i can trigger a sync option for these files? Locally I have been able to do it by modifying the last line of the json. let me try on the server with the ftp plugin.

June 4, 2021 at 11:08 pm #8919617

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

This is actually explained here:

hidden link

We need to create a folder inside the theme called /acf-json/. Now each time a field group is saved a file is created for this config inside the folder.

If there is an issue with the current files, you could simply try to delete the current files in your theme folder and save the field groups again, which will create new files.

On my test site I do not see any error yet. Please provide me more details about the issue and how we could recreate it.

Did you try to edit the JSON files and upload the config to the ACF Group?

Best regards
Andreas

June 5, 2021 at 6:31 pm #8923359

amyL-11

Based on the error I am getting, I will have to alter the ACFML plugin. I did so and the error disappeared. Perhaps you can connect with the developers to see if this fix should go into the next release:

For the file:
/wp-content/plugins/acfml/classes/class-wpml-acf-field-settings.php

and the error:
Notice: Undefined index: wpml_cf_preferences in /Users/eddie/WEBSITES/WB-GitHub/sitecode/document-root/wp-content/plugins/acfml/classes/class-wpml-acf-field-settings.php on line 253

on line 237 I added:

$field['wpml_cf_preferences'] ='';

This is just inside of the private function.

private function update_existing_subfields( $field ) {
		$field['wpml_cf_preferences'] ='';

Can you check with the developers on this?

June 6, 2021 at 1:02 am #8923651

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Sure, I would like to do that, but in order to escalate the issue I need to be able to recreate the error on a new WP install which for I have already prepared this test-site here:

One-Click-Login:
hidden link

Please provide me details about how to recreate the error and if the error is replicable on this test site.

The only information I do have is that the error occurs up sync, which occurs when ACF initiates and each time we save a Field Group and I can not yet confirm this on our test environment.

If we can not replicate the error, then possible the issue is linked to another component (theme/plugin) which runs together with ACFML on your site and we need to investigate further.

On the test-site once an error is captured it will be saved inside the folder /wp-content/ in a file named debug.log. I have made some test while editing and updating Field Groups which created/updated JSON files in the dedicated theme folder without issues. No error was found so far.

Maybe you could add the theme that is use don your site in its latest version so that we can test if it is a theme issue?

Also, did you already try my workaround, which would be taking a backup of the current found JSON files, deleting them and then saving the Field Groups again? This will create new JSON files based on the current field group settings. Does the error persist this way?

Best regards
Andreas

June 7, 2021 at 1:33 am #8928855

amyL-11

I did add the new theme to this test site. But the result is a white, blank site. Let me upload everything to this test site to recreate the error.

June 9, 2021 at 2:52 am #8946695

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I am sorry to hear that but this theme seems to be a custom theme, right? Does it maybe come with any Core Plugins?

Please provide me admin access to your site again and I will take a site copy for debugging the reported error.

The private reply fields are enabled.

Best regards
Andreas

The topic ‘[Closed] Notice: Undefined index: wpml_cf_preferences’ is closed to new replies.