Skip Navigation

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 6 replies, has 3 voices.

Last updated by Bigul 4 years, 6 months ago.

Assigned support staff: Bigul.

Author Posts
July 7, 2016 at 10:59 am #947192

benN-3

I am trying to:
Generate sitemap xml, after upgrading to new version of WPML, it broke the sitemap for all plugins. I tried yoast, and xml google.
URL of (my) website where problem appears:
hidden link

When deactivating WPML, it works fine.
When WPML is activated I get this error in the logs:
PHP Fatal error: Call to undefined method Composer\\Autoload\\ClassLoader::setPsr4() in /home/admin/web/wedivite.com/public_html/wp-content/plugins/sitepress-multilingual-cms/embedded/composer/autoload_real.php on line 33

And see a error 500 page where the sitemap should be.

July 7, 2016 at 1:17 pm #947444

Bigul
Supporter

Languages: English (English )

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

Hi Ben,

Thank you for contacting the support team. We are happy to help you.

Does it happen after upgrading from WPML 3.4 to 3.4.1 or from WPML 3.3.8 to 3.4.1 ?

If possible please share me detailed debug log of this error(using Xdebug php extension). So it will easy for our developers to track.

--
With Regards

Bigul

July 7, 2016 at 3:20 pm #947668

klausW-4

Hi,

I just payed 200 bucks and can't even activate the plugin. Yay! I get the same error as Ben does, but upon activation of the plugin.

The dashboard says: "Das Plugin kann nicht aktiviert werden, da es einen fatalen Fehler erzeugt."

The servers PHP error log says: "[Thu Jul 07 16:56:33 2016] [error] [client 89.15.100.8] PHP Fatal error: Call to undefined method Composer\\Autoload\\ClassLoader::setPsr4() in [my absolute path]/wp-content/plugins/sitepress-multilingual-cms/embedded/composer/autoload_real.php on line 33, referer: [my domain]/wp-admin/plugins.php?plugin=sitepress-multilingual-cms%2Fsitepress.php"

My WP version is 4.5.3. I upgraded from 4.4.4 because I thought this could be the problem, before I took a look into the PHP error log. So same arror on 4.4.4.

My server is running PHP 5.6.

Please help me and Ben a soon as possible.

Kind regards,
Klaus

July 8, 2016 at 9:21 am #948842

Bigul
Supporter

Languages: English (English )

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

Hi Ben & Klaus,

Sorry for the issue. Please share me your PHP info details for tracking the issue. It will be great if you can share the detailed debug log for this error by activating Xdebug extension.

hidden link

--
With Regards

Bigul

July 8, 2016 at 1:47 pm #949284

Bigul
Supporter

Languages: English (English )

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

Hi Ben & Klaus,

We found a reason for this issue. This issue happens from one of your other plugins using an outdated version of Composer, where the autoloader does not support setPsr4() method.

To fix the issue you must first find the offending plugin: you can do it by disabling all plugins, except WPML, and then re-activating them one by one.

Please check following errata URL for more details.

https://wpml.org/errata/fatal-error-activation-call-undefined-method-composerautoloadclassloadersetpsr4/

--
With Regards

Bigul

July 8, 2016 at 2:55 pm #949485

benN-3

Hi!
This only happens when WPML Multilingual CMS plugin is enabled. I upgraded from WPML 3.3.8.
I disabled all of the plugins and left only WPML and the error persists. Further more, I re-enabled all of them and turned off just WPML, and it fixed the problem. So it definitely something in your code... and it happened after the update...

Please get this fixed soon, we are getting bad rep in google because of the bad sitemap... This happens for me only on the sitemap url by the way, so maybe it's something there...

July 11, 2016 at 7:03 am #950956

Bigul
Supporter

Languages: English (English )

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

Hi Ben,

The reason for this issue is *different plugins could autoload different Composer autoloader under their vendor/composer directories,and if the first-loaded one is using rather an old autoloader (which did not support psr4), the latter one (likely set-up with newer Composer) cause this error*. Please check this URL for more details hidden link

Please fill the private details fields after a full site backup. I would like to access your Dashboard for further checking.

Also, can I make a duplicator copy of your site using Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue in my local.

--
With Regards

Bigul

The topic ‘[Closed] PHP Fatal error: Call to undefined method Composer\\Autoload\\ClassLoader::setPs’ is closed to new replies.