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 topic contains 7 replies, has 5 voices.

Last updated by danielA-25 10 months, 3 weeks ago.

Assigned support staff: Bigul.

Author Posts
December 27, 2018 at 12:42 pm #3036854

emirA-2

Suddenly, my options pages for Arabic and Farsi (translations from English) are completely broken.
I saw the logs and this is the error:
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught InvalidArgumentException: Argument ID must be numeric and greater than 0. in /var/www/vhosts/savoryandpartners.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:28\nStack trace:\n#0 /var/www/vhosts/savoryandpartners.com/httpdocs/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php(35): WPML_Translation_Element->__construct(false, Object(SitePress), NULL)\n#1 /var/www/vhosts/savoryandpartners.com/httpdocs/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')\n#2 /var/www/vhosts/savoryandpartners.com/httpdocs/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, 'title-antigua')\n#3 /var/www/vhosts/savo...\n', referer: hidden link

I saw another user has submitted about 2 hours ago and it was escalated to compatibility theme, but there is a warning in the bottom that says I might not be contacted and I should create a new ticket, so here it is.

December 27, 2018 at 3:16 pm #3037425

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

We have escalated the issue to our compatibility team for further debugging. We will get back to you soon when we have an update on this from our team. Please wait.

--
Thanks!

Bigul

December 27, 2018 at 10:08 pm #3038571

emirA-2

I have found that the issue is in Advanced Custom Fields Multilingual v1. Version 0.9 works fine, but after updating to 1.0 the options page in translated languages is broken. I have tested and confirmed this on a local copy of the website, too.
Quickfix is to downgrade to Advanced Custom Fields Multilingual 0.9

December 28, 2018 at 11:54 am #3039895

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the feedback. Our compatibility team is working on this issue now. We will get back to you as early as possible. Please wait.

--
Thanks!

Bigul

December 28, 2018 at 4:40 pm #3040869

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

For your kind updates, our compatibility team has added a fix for this issue and we have a patch version now. The fix will be included in ACF Multilingual 1.0.1 and it will be released soon(after QA).

If possible, please try the fix version after a full site backup and let me know your feedback.

hidden link

--
Thanks!

Bigul

January 14, 2019 at 10:28 am #3086768

tomerO

hi. where can i get this patch? i have the same issue

January 14, 2019 at 3:45 pm #3088507

glebM

ACF Multilingual v1.0.3 seems still to have same issue...

"Argument ID must be numeric and greater than 0" is in log's, and options page broken... deactivating fixes the issue.

January 14, 2019 at 9:33 pm #3089757

danielA-25

Same problem here, english language does only show first option on 4 different pages in backend.

WPML Multilingual CMS 4.1.3
ACF Pro 5.7.9
ACF Multilingual 1.0.3

We fixed it with the following hack in wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php

 if ( ! is_numeric( $id ) || $id <= 0 ) {#                       throw new InvalidArgumentException( 'Argument ID must be numeric and greater than 0.' );
                }

We think that the next update will give us new work - as long as there is no proper fix released by WPML or ACF. Are you guys in contact with ACF reguarding that problem? It seems this is not a minor issue.

Kind Regards
Daniel

Original Error Message

Fatal error: Uncaught InvalidArgumentException: Argument ID must be numeric and greater than 0. in /srv/data/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:28 Stack trace: #0 /srv/data/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php(35): WPML_Translation_Element->__construct(false, Object(SitePress), NULL) #1 /srv/data/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 /srv/data/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, 'teaser-title-3') #3 /srv/data/wp-includes/class-wp-hook.php(286): WPML_Custom_Fields_Post_Meta_Info->get_info_filter(NULL, false, 'teaser-title-3') #4 /srv/data/wp-includes/plugin.php(203): WP_Hook->apply_filters(NULL, Arr in /srv/data/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 28