Reported for: WPML Multilingual CMS 4.4.10
Overview of the issue
A blank screen appears and after enabling debug mode, the following error appears in some configurations:
PHP Fatal error: Uncaught InvalidArgumentException: element_id and type do not match in \wp-content\plugins\sitepress-multilingual-cms\classes\core-abstract-classes\class-wpml-set-language.php on line xx
These kinds of exceptions were hidden from the user in the previous version. In the long run, however, they might lead to database corruption and we have decided to no longer hide them. Starting from WPML 3.3.5, such exceptions are thrown to allow users to spot the issue immediately. This will make fixing issues with corrupted settings much easier, since they can be caught in their early stage.
Issues may look different on different installations. The issue may:
- Appear in WPML admin pages.
- Make it impossible to access the Plugins page.
- Occur on WPML (or its add-ons) activation only.
- Occur when posts are being saved.
A blank screen appears in every case, with the error appearing with debug mode enabled.
Please, make a full backup of your site before proceeding.
If you can still access to your Dashboard:
- Go to WPML → Support.
- Click on the Troubleshooting link.
- Click on the Fix post type assignment for translations button.
- You may need to click on the Remove ghost entries from the translation tables button.
If you can’t access or it does not help:
- Access to your database.
- Open the wp_icl_translations table.
- Search for the element_id which is throwing the error.
- Delete the row.
You might need to repeat the workflow several times until the issue is fixed.
please keep me posted on this issue.
Hello, I’ve used 3.3.7 b1 but it didn’t solve it.
This issue was fixed in WPML 3.3.6 and everything should work in the 3.3.7 beta version as well. Could you please report the issue using the support forum? There, we will be able to provide faster and better support, adjusted to your specific case – something we can’t do via these comments.
Hello i’m using WPML Multilingual CMS 4.5.1 in a fresh new installation and i’m experiencing a lot of wpml-cms issues.
I almost ever experienced from this october this kind of issues until it was broken in unknow way ( gave error 500 on every i18n’s page load). It was impossible to migrate it safely and was very strugglying to debug.
I guess wpml auto upgraded itself but then trying to solve i updated, reinstalled, upgraded but nothing worked.
At the end i reinstalled in a separate fresh env to and i’m experiencing this kind of issue without even having ever used it.
Is this a stable product or to use it is only a big waste of time?
I’m sorry for your experience. However, WPML does not upgrade automatically, it needs to be approved by an user with those rights.
Regarding this error, if after applying the fix proposed in this article the issue remains, please open a ticket in our support forum so we can help you better as we don’t have the right debugging tools here.
I’m experiencing the same issue and I tried to fix with method one but it’s not working.
If the workaround does not help, please open a ticket in our support forum so we can help you better.
i have 4.5.5…
If the issue persists after applying any of the workarounds, please open a ticket in our support forum so we can investigate it better.
I have installed 4.5.5. I am getting this issue. Please help me to resolve this.
I’m sorry to hear that experience. In your case, as you are just installing WPML, please follow the 2nd workaround.
If that does not help, please open a ticket in our support forum so one of our specialists can help you.
Yes thank you.
1) increase the WordPress Memory Limit
2) Fix post type assignment for translations under the Support Page | i had 290 issue fixed.
Originally, i want to rebuild the site. Now is OK.
Thanks a Lot
I’m glad to know that it helped
i cant understand what to do and how to do it.
i have problem with my both websites,
can you help me please ?
If you are having issues applying any of those workarounds, please open a ticket in our support forum where one of our specialists will guide you through this process.
unfortunately, the error still exists, now the latest article is not visible, even though a backup was made and the suggested fatal error code was also deleted
If the workaround didn’t help, please open a ticket in our support forum where one of our specialists will be able to help you better.
thank you, but we’re over this. anyway, I’ll open a new case for that