This thread is resolved. Here is a description of the problem and solution.


Fatal error: Uncaught InvalidArgumentException: Argument ID must be numeric and greater than 0 in /wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 28

when editing a translated category.


Update ACFML plugin to ACFML 1.0.4

Relevant Documentation:

0% of people find this useful.

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.

Our next available supporter will start replying to tickets in about 3.58 hours from now. Thank you for your understanding.

This topic contains 7 replies, has 3 voices.

Last updated by Dan 1 year, 4 months ago.

Assigned support staff: Dennis.

Author Posts
January 14, 2019 at 7:33 pm #3089542


Dear Support people,

I am facing the following error "Fatal error: Uncaught InvalidArgumentException: Argument ID must be numeric and greater than 0" - see detailed version below.
This happens when editing a translated version of a category:
hidden link

I have tried out different suggestions found in the support forum, for example "Remove ghost entries from the translation tables". Also tried some of the hacks with wp_get_nav_menu_items_filter but nothing fixes it.
I went back in wpml versions and see that the issue started with sitepress-multilingual-cms version 4.0.0-b.1
Version 3.9.4 works fine.

Do you have any suggestions how to fix this?
I am working on a local dev instance and can if needed provide you access to the wp admin ui.
Thanks much for your kind help!
Please respond to
With best regards,
Henri Wohlfarth
Internet Society Developer

Fatal error: Uncaught InvalidArgumentException: Argument ID must be numeric and greater than 0. in /Users/wohlfarth/Sites/isoc-wp/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:28 Stack trace: #0 /Users/wohlfarth/Sites/isoc-wp/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php(35): WPML_Translation_Element->__construct(false, Object(SitePress), NULL) #1 /Users/wohlfarth/Sites/isoc-wp/wp-content/plugins/sitepress-multilingual-cms/classes/custom-field-translation/class-wpml-custom-fields-post-meta-info.php(85): WPML_Translation_Element_Factory->create(false, 'post') #2 /Users/wohlfarth/Sites/isoc-wp/wp-content/plugins/sitepress-multilingual-cms/classes/custom-field-translation/class-wpml-custom-fields-post-meta-info.php(81): WPML_Custom_Fields_Post_Meta_Info->get_info(false, 'category_image') #3 /Users/wohlfarth/Sites/isoc-wp/wp-includes/class-wp-hook.php(286): WPML_Custom_Fields_Post_Meta_Info->get_info_filter( in /Users/wohlfarth/Sites/isoc-wp/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 28

January 15, 2019 at 6:13 am #3090960



Welcome to WPML Support forum.

Could please try the following steps? Please make sure to make a complete backup of your site before proceeding.

#1 Clear all cache from cache plugins (redis cache) / you can also try to temporarily deactivate them if possible.


Please increase the PHP Memory Limit (your current setting is 40M). Minimum requirements are 128Mb:

You can add this to wp-config.php to increase WP memory:

/** Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

- Add it above the line

 /* That's all, stop editing! Happy blogging. */ 


-Go to WPML>>Support page
-Click on Troubleshooting link (link in the middle of the page)
-In Troubleshooting page, please click on the following options of 'Clean up' section. Wait for confirmation of processing after each one.
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment

Does it help? Please let me know.

Kind regards,

January 15, 2019 at 10:19 am #3092082


Hi Dennis,
Thank you for the feedback.
In fact, I had already tried almost all these options, except for the memory increase. Even doing that, the error persists.
The error is replicable on 3 different site versions:
- production, cloudfront nginx environment, 3072M memory limit
- dev, cloudfront nginx environment, 2624M memory limit
- local dev, apache, 1024M memory limit

I have also tried the options discussed here, but no success so far:

Again, the issue started with sitepress-multilingual-cms version 4.0.0-b.1 back in May 2018, but was only noticed recently when editing a translated category, example:
hidden link

Version 3.9.4 worked fine.
Are you aware of any patch or workaround for this?
I see the topic was quit discussed in the forum but I can't find anything that resolves it.

Thanks much for your investigation!

January 16, 2019 at 5:43 am #3096049



Thank you for your reply.

We have some similar error reported, but all clients solved with Removing ghost entries or updating ACFML latest to release. Could you also try to update ACFML and see if it solves the issue.

Also, could you please check if the error is still happening if you only disable ACF Multilingual?

Kind regards,

January 16, 2019 at 6:57 am #3096275


Dear support,

we are facing the same problem. Disabling ACFML fixes the problem, anything else suggested here doesn't work. ACFML and all other WPML plugins are up to date, ACF is at 5.7.10.

Best regards

January 16, 2019 at 10:21 am #3097005


Hi Dennis,

Thank you for your reply.

Disabling ACF Multilingual solves the error indeed!
Updating ACFML to 1.0.3 (latest) doesn't fix the issue. Looking at the changelog, there is nothing pointing to such a fix.
Is there a fix available for ACFML, or is there a fix underway?

Best regards,

January 17, 2019 at 1:09 am #3099946



Thank you for your reply.

ACFML 1.0.4 was released recently. Could you please try to update you ACFML?

Please let me know how it goes.

Kind regards,

January 17, 2019 at 9:18 am #3100958


Thanks Dennis and involved developers for the fix, that solved the issue!