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 1 reply, has 2 voices.

Last updated by Ricardo Alday 1 year, 7 months ago.

Assigned support staff: Ricardo Alday.

Author Posts
October 7, 2018 at 9:54 am #2793650



Our server resources are much more now. So we checked the error log to identify the issue on our website. We found few fatal errors. I am pasting them here:

[php7:error] [pid 16607] [client] PHP Fatal error: Uncaught InvalidArgumentException: Argument ID must be numeric and greater than 0. in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:28\nStack trace:\n#0 /var/www/html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element-factory.php(35): WPML_Translation_Element->__construct(0, Object(SitePress), NULL)\n#1 /var/www/html/wp-content/plugins/sitepress-multilingual-cms/compatibility/visual_composer/class-wpml-compatibility-plugin-visual-composer-grid-hooks.php(58): WPML_Translation_Element_Factory->create(0, 'post')\n#2 [internal function]: WPML_Compatibility_Plugin_Visual_Composer_Grid_Hooks->replace_grid_id(Array)\n#3 /var/www/html/wp-content/plugins/sitepress-multilingual-cms/compatibility/visual_composer/class-wpml-compatibility-plugin-visual-composer-grid-hooks.php(46): preg_replace_callback('/(\\\\[vc_basic_gr...', Array, '[vc_column][vc_...')\n#4 /var/www/html/wp-includes/class-wp-hook.php(288): WPML_C in /var/www/html/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 28

Please check it and let me know what needs to be done.
Its very urgent.


October 8, 2018 at 10:02 pm #2797475

Ricardo Alday

Hi Sukumar,

Thank you for contacting support.
The problem seems to be in the vc_shortcode_content_filter function from sitepress-multilingual-cms/compatibility/visual_composer/class-wpml-compatibility-plugin-visual-composer-grid-hooks.php file. Do a backup of your site and then change the function on line 44 from this:

public function vc_shortcode_content_filter( $content ) {
		$pattern = '/(\[vc_basic_grid.*item=")([^"]*)(".*\])/';
		return preg_replace_callback( $pattern, array( $this, 'replace_grid_id' ), $content );

To this

	public function vc_shortcode_content_filter( $content ) {
		$pattern = '/(\[vc_basic_grid.*item=")([^"]*)(".*\])/';
		return $content;// preg_replace_callback( $pattern, array( $this, 'replace_grid_id' ), $content );

Let me know if it helps or not.


The topic ‘[Closed] Showing fatal Error’ is closed to new replies.