 markW-54
|
FYI - I have just set the site back to use the Classic translation editor for both new and previously created posts. Feel free to change any settings you like.
Eamonn
|
 markW-54
|
Further testing. I have just done the following:
1) I deleted the Spanish translation for the page Accommodation (I listed all Spanish pages, deleted the Spanish translation of the accommodation page and permanently deleted the page from trash).
2) Using the classic editor, I started the process of adding a Spanish translation.
3) I pressed "overwrite with English content" and pressed OK to the warning popup.
4) My intention was then to press "Translate independently". However, before I could do this the "InvalidArgumentException" was displayed. See screenshot.
I believe that this test result is significant.
|
 Bobby
WPML Supporter since 04/2015
Languages:
English (English )
Timezone:
America/Los_Angeles (GMT-07:00)
|
Thank you for the updates! I have made sure to include them for our team.
Regarding your move from the Advanced Translation Editor to the Classic Editor, I understand you said you do not want to use the Advanced Translation Editor and Automatic Tranlsation, however, do note that you can remain using the Advanced Translation Editor even without the automatic translation.
This is important as if you do your translations in the Advanced Translation Editor they do not copy over to the classic editor.
The classic editor saves the translations in the database whereas the advanced translation editor saves them in the cloud therefore the 2 do not communicate.
When I edit the Accommodations page for example, If I switch to the advanced editor and access the translation I can see that this was the editor used before.
Nevertheless, even though I switch back to the ATE and update the default language and translation the issue is still triggered. Once I have some updates from our team I will update you.
|
 markW-54
|
Hi there,
I'm keen to get an update on this issue. It has happened again with another site. I have just copied this site (hidden link) over to Siteground at this URL (hidden link). We are seeing exactly the same problem - when we try to view the Spanish translation of any page other than the homepage we get the same error:
Fatal error: Uncaught InvalidArgumentException: target should be an object with filter method or an array in /home/customer/www/website2023.ailmalaga.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php:207 Stack trace: #0 [internal function]: WPML\FP\Fns::WPML\FP\{closure}(Object(Closure), false) #1 /home/customer/www/website2023.ailmalaga.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array) #2 /home/customer/www/website2023.ailmalaga.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/wp-core-hooks/post/class-wpml-remove-pages-not-in-current-language.php(48): WPML\FP\{closure}(false) #3 /home/customer/www/website2023.ailmalaga.com/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(2269): WPML_Remove_Pages_Not_In_Current_Language->filter_pages(false, Array) #4 /home/customer/www/website2023.ailmalaga.com/public_html/wp-includes/class-wp-hook.php(31 in /home/customer/www/website2023.ailmalaga.com/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php on line 207
This is now getting extremely frustrating - we need to get these sites live and this WPML malfunction is standing in the way. I'm struggling to understand why we're seeing errors with multiple site, but not with this site - hidden link. In terms of inheritance, this site is the sibling of website2023.ailmalaga.com and the parent of website2023.ailespanol.com. I can't understand why one site works perfectly but the other two fail.
Could you let me know what your 2nd line team has discovered?
Many thanks,
Eamonn
|
 markW-54
|
I've been looking through your support log and I have found this brief thread from May 2022:
https://wpml.org/es/forums/topic/fatal-error-al-ver-la-web-en-ingles/
The thread describes exactly the same issue as the one we are seeing. The thread is also marked as resolved. Perhaps you could check in with the engineer who handled this support request (https://wpml.org/es/forums/users/carlos-r/)
All the best,
Eamonn
|
 Nicolas V.
Supporter
Languages:
English (English )
French (Français )
Timezone:
America/Lima (GMT-05:00)
|
Hello Eamonn,
Bobby is not available today. I just wanted to let you know that your ticket as been escalated to a higher level.
Bobby or I will get back to you as soon as we have some feedback.
|
 markW-54
|
Thanks Nicolas,
Much appreciated.
Eamonn
|
 Nicolas V.
Supporter
Languages:
English (English )
French (Français )
Timezone:
America/Lima (GMT-05:00)
|
Hello,
We're not sure about what's causing the issue because our developers couldn't reproduce it on our servers but here is a quick workaround.
- Access your server files via FTP or Cpanel
- Edit wp-content/plugins/sitepress-multilingual-cms/classes/wp-core-hooks/post/class-wpml-remove-pages-not-in-current-language.php
- Around line 34 replace:
$filtered_posts = $posts;
- With:
$posts = (isset($posts) && is_array($posts)) ? $posts : array();
PS: They already applied that fix on your staging site.
|
 markW-54
|
Hi Nicolas,
Apologies for the slow reply - I was off work with illness for a few days.
Thank you so much for the workaround - I've applied it to another malfunctioning site and it works there also.
Let's call this issue solved for the time being - I'll open a fresh ticket if it reoccurs.
Many thanks and all the best,
Eamonn
|
 markW-54
|
Thanks for all the good suggestions and for finding a workaround.
|