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 Diego Pereira 2 months ago.

Assigned support staff: Diego Pereira.

Author Posts
January 27, 2019 at 12:39 pm #3132654

massimoG-5

I am trying to: salvare un nuovo post

Instead, I got: errore PHP come da screen allegato

Quando provo a salvare un post con campi ACF ottengo l'errore nello screenshot. Se disabilito il debug l'errore non si presenta ma chiaramente rimane nel log PHP.

Inoltre ho problemi con la traduzione dei campi personalizzati che a volte si resetta.

Essendo il sito da mettere in produzione nel breve avrei bisogno di supporto. Con la precedente versione di ACF WPML non ho mai riscontrato il problema.

January 27, 2019 at 3:51 pm #3132894

massimoG-5

Vi riporto il fix, c'è un errore nella funzione, va passato in modo diretto il valore e non una funzione.

/acfml/classes/class-wpml-acf-custom-fields-sync.php

Linea 53

aggiunta:

$fix = end($value);

modifica:

if (is_array($value) && end($fix) === "") {  ... 

Rimane il problema che quando si definisce il comportamento di un custom field (ne ho meno di 200, non credo sia un problema di "memoria"), cioè Traduci, Copia, Copia una Volta, Non Tradurre, il plugin non salva correttamente il valore, infatti se si da un salva quando non si ha aperto tutti i fields, viene salvata solo la prima pagina e il resto dei field viene portato su non tradurre...

Video (il video è stato fatto in locale in riprova che sicuramente non dipende dal server, sono stati anche disabilitati tutti i plugin tranne ACF Pro, ACFML, Sitepress Multilingual CMS, WPML String Translation e WPML Translation Management, tema di default): hidden link

January 29, 2019 at 11:19 am #3139387

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @massimog-5, welcome to the WPML support Forum!

I noticed that you posted in Italian, but this is the English forum (unfortunately, I do not speak Italian, but I want to learn). Do you prefer that this ticket be forwarded to an Italian supporter or can we continue in English?

It seems that you found a bug with ACF and ACFML, correct? If so, could you reprouce the issue on a clean install? This way I can forward to our development team to run some tests and launch a fix if needed.

I created a test website with a clean WordPress install. You can access it through this link:
hidden link - Through this link you will be automatically logged in.

Please upload the plugin to this test install if needed (I already installed ACF and ACFML), setup it the same way as in your website (using the same options) and create some dummy content to reproduce the issue. Please note that we only need the plugin and the related functionality, you don't need to setup a entire website or clone your existing site.

After that, please send us clear steps on how to see/reproduce the issue on this test install. We will run some tests.

All the best,
Diego

January 29, 2019 at 11:33 am #3139440
massimoG-5

Sorry! I've posted in English forum.

I'm try to report problem in English

The first problem is with ACFML.

File: /acfml/classes/class-wpml-acf-custom-fields-sync.php
Line: 53
Problem: You pass a function and not a value and if don't work. Show first post for error screenshot.
Solution:

Add this or similar before line 53

$fix = end($value);

Change expression in line 53

if (is_array($value) && end($fix) === "") {

The seconds problem is with WPML translation settings for Custom Field (not only ACF)

As in this video: hidden link

WPML don't save correct value. There are 2 bug.

WPML don't save value of CF or if you save value of first page of CF, WPML reset to No Translate all of other page of Custom Fields.

You can show the same in your installation: video -> hidden link

Best Regards

New threads created by Diego Pereira and linked to this one are listed below:

https://wpml.org/forums/topic/split-acf-custom-post-type-save-problem/

January 30, 2019 at 11:10 am #3143441

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

I divided this ticket into 2: this for issue # 1 and another for issue # 2.

The issue #1 is related to the PHP notices (only variables should be passed in reference) and you already found a fix for this, correct? COuld you send us the steps to reproduce the error on the test site, so I can forward the fix to our Dev team? We need to reproduce the error before testing the fix.

We will handle the issue #2 in the other ticket.

Kind regards,
Diego

February 1, 2019 at 9:32 am #3150939

massimoG-5

With WP debug true, when you save a post with copy once fields, you can show the errors in first post screenshots.

You can find more info here: hidden link

February 4, 2019 at 11:48 am #3157344

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks! I was able to reproduce the issue and escalated this ticket to the 2nd tier support. We will run some tests and forward to the DEV team if needed.

Kind regards,
Diego

March 1, 2019 at 12:45 pm #3260558

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Just an update that the fix will be released in the next ACFML release.

Kind regards,
Diego

August 21, 2019 at 6:18 pm #4434539

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

The fix has already been released. Updating ticket status.