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 5.24 hours from now. Thank you for your understanding.


This topic contains 3 replies, has 2 voices.

Last updated by alfonsoP-2 1 year, 9 months ago.

Assigned support staff: Lucas Bustamante.

Author Posts
August 29, 2018 at 5:46 pm #2687570


This is the error

Catchable fatal error: Argument 2 passed to WPML_SEO_HeadLangs::__construct() must be an instance of WPML_Queried_Object_Factory, none given, called in /home/irepairsa/www/wp-content/plugins/wp-amp/includes/class-amphtml-no-conflict.php on line 66 and defined in /home/irepairsa/www/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php on line 16

August 29, 2018 at 8:23 pm #2687774

Lucas Bustamante

Hi Alfonso,

I see that the faulty function is being called by "WP AMP" plugin.

To see why "WP AMP" calls the function "WPML_SEO_HeadLangs", I would like a copy of this plugin. You can attach it's zip file privately in your next reply.

Best regards,

August 30, 2018 at 12:16 pm #2689958

Lucas Bustamante

Hi Alfonso,

Can you try to make a small change in WP AMP plugin?

Go to wp-content/plugins/wp-amp/includes/class-amphtml-no-conflict.php and replace line 66:


$wpml_seo_headlangs = new WPML_SEO_HeadLangs( $sitepress );


$wpml_seo_headlangs = new WPML_SEO_HeadLangs( $sitepress, new WPML_Queried_Object_Factory() );

This will stop working when you update WP AMP. I suggest you contact them with the fix above for a permanent fix since this problem is in WP AMP, not on WPML.

Best regards,

August 30, 2018 at 1:06 pm #2690230


Great!! Thanks a lot!!