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 thread is resolved. Here is a description of the problem and solution.

Problem: Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Argument ID must be numeric and greater than 0.'

Solution: Upgrading the plugin to Latest version 3.6.1 solved the issue.

Relevant Documentation: https://wpml.org/errata/fatal-error-uncaught-exception-invalidargumentexception/

This topic contains 3 replies, has 3 voices.

Last updated by ariefw 2 years, 10 months ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
December 2, 2016 at 10:26 am #1149784

ariefw

just buy wpml 4 days ago, install WPML multilingual cms plugin into my live website, activate, basic setup indonesian(default)-english translation, activate footer language switcher, visit site, and blank homepage

so I decided try the plugin setup into a copy of my live website running in localhost instead of live ones. doing same setup step, but iam putting the language switcher into theme's header using shortcode, visit site, default homepage which is indonesia is normal (see attached screenshot), when switch into english only language switcher show up and the rest is blank with error (see attached screenshot) :

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Argument ID must be numeric and greater than 0.' in /Applications/MAMP/htdocs/unissulamulti/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:28 Stack trace: #0 /Applications/MAMP/htdocs/unissulamulti/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-term-element.php(19): WPML_Translation_Element->__construct(NULL, Object(SitePress), NULL) #1 /Applications/MAMP/htdocs/unissulamulti/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-menu-element.php(17): WPML_Term_Element->__construct(NULL, Object(SitePress), 'nav_menu', NULL) #2 /Applications/MAMP/htdocs/unissulamulti/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php(313): WPML_Menu_Element->__construct(NULL, Object(SitePress)) #3 /Applications/MAMP/htdocs/unissulamulti/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class- in /Applications/MAMP/htdocs/unissulamulti/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 28

about the site :
1. using wordpress v4.0
2. using custom theme called tonjoo (we hire third party to develope it)
3. the plugin that active are : akismet, regenerate-thumbnails, baw-post-views-count, simple-subscribe, better-search-replace, single-post-template, breadcrumb-navxt sitepress-multilingual-cms, contact-form-7, toggles-shortcode-and-widget, fluid-responsive-slideshow, tonjoo-library, tonjoo-ultimate-post-list, json-api, types, json-rest-api-wp-api-categories-and-tags, ubermenu, m-wp-popup, wp-api-json-reader, media-tools, wp-sitemap-page

please help me how to make this works, thank you very much

December 2, 2016 at 12:27 pm #1149973

Ankit

Hi,

Can you please apply this errata and check if this helps you?

Errata: https://wpml.org/errata/fatal-error-uncaught-exception-invalidargumentexception/

Also, this issue has been fixed in wpml version 3.6.1, so I would request you to kindly update wpml cms plugin to version 3.6.1

To receive automatic update of plugin, please refer : https://wpml.org/faq/install-wpml/#receiving-updates

To update wpml plugins manually, please refer: https://wpml.org/faq/install-wpml/#updating-manually

Please let me know if it helps.

Regards,
Ankit

December 5, 2016 at 8:44 am #1151138

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hi there,

Could you please let me know if the solution posted by Ankit helped you?

I look forward to your reply.

Thanks

December 5, 2016 at 9:12 am #1151176

ariefw

Hi, Ankit, and also Shekhar,

I just update the plugin to 3.6.1 and the error message is gone, my homepage is appears like normal right now, but i guess its time to make another thread since my homepage news that handle by ultimate post list plugin shortcode (list sort by post category) is blank, although the post already translated

Thank you very much for your help