This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing a fatal error when trying to switch languages on the front page of their website. The error was related to an illegal offset type in the
class-wpml-element-translation.php
file within the WPML plugin.
Solution: We acknowledged the issue and confirmed that it had been escalated to our development team for resolution. We could not provide a specific date for the fix but assured the client that it would be included in future releases. We also requested that the client continue using their temporary solution, which involved modifying the
maybe_populate_cache
function in the
class-wpml-element-translation.php
file to include an
is_numeric
condition.
Please note that this solution might be irrelevant due to it being outdated or not applicable to your case. If you're experiencing similar issues, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket with us.
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.
Link to a page where the issue can be seen: hidden link
I expected to see: translated page
Instead, I got: a fatal error
---
Warning: Illegal offset type in isset or empty in /home/customer/www/example.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php
----
We found a temporary solution by modifying a function (maybe_populate_cache) adding a 'is_numeric condition'. File : (/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php).
Hello, thank you for your reply.
At the moment we don't have the fatal error because, as I mentioned, we've found a temporary solution by modifying the plugin files directly.
You will find attached an image with the code we modified in the plugin file /wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php.
We had to add a condition with an 'is_numeric' parameter in the 'maybe_populate_cache' function to avoid getting the fatal error when changing language on the website.
The fatal error was as follows: Warning: Illegal offset type in isset or empty in /home/customer/www/example.com/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/core-abstract-classes/class-wpml-element-translation.php
My question is whether you're aware of this problem and whether there's a possibility that you'll take into account the modification we had to make for a future update of your plugin.
Thank you for your reply.
I tried the workaround and it works too. Do you know if an update of the acfml plugin is planned to correct this compatibility problem?
Thank you
Thank you for the update. So we can confirm that it is the same issue. It has been escalated to our development team for resolution. Unfortunately, I cannot provide a specific date for when it will be resolved, but it will be included in future releases of ACFML.
In the meantime, we kindly request that you provide a workaround to overcome the issue. Once the issue is resolved, the status of the link will be marked as 'Resolved'. Thank you for your patience and understanding.