Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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:
When I activate WPML plugin, I am getting this error:

Fatal error: method_exists(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "unknown" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /var/www/vhosts/infomerciale.info/zespa.infomerciale.info/wp-content/plugins/sitepress-multilingual-cms1/classes/language-switcher/class-wpml-ls-templates.php on line 304

Solution:
We have another client who had the similar issue and was also able to solve it, this may help in your case: https://wpml.org/forums/topic/cant-activate-wpml-3/#post-1560411

- To solve this issue you need to do a migration without ManageWP clone since the issue is happening due to migration.

- OR You can use some other plugins to migrate site such as Duplicator or manually migrate the site: https://wordpress.org/plugins/duplicator/

This topic contains 5 replies, has 3 voices.

Last updated by Pim 1 year, 2 months ago.

Assigned support staff: Noman.

Author Posts
October 24, 2018 at 5:03 am #2844871

Maximilien HAIBI

when i am activating plugin, i am getting this issue

Fatal error: method_exists(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "unknown" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /var/www/vhosts/infomerciale.info/zespa.infomerciale.info/wp-content/plugins/sitepress-multilingual-cms1/classes/language-switcher/class-wpml-ls-templates.php on line 304

WordPress 4.9.8
Divi Version: 3.17.2
WPML Multilingual CMS 4.0.7

October 24, 2018 at 3:25 pm #2847052

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. We have another client who had the similar issue and was also able to solve it, this may help in your case:
https://wpml.org/forums/topic/cant-activate-wpml-3/#post-1560411

Thank you

October 26, 2018 at 10:56 am #2852831

Maximilien HAIBI

Hello

Thanks for your quick reply,

Yes, i have a clone website using managewp, delete wpml plugin and reinstall fresh download plugin, getting same error 🙁

if you need i can share administrator login with you.

Thanks

October 26, 2018 at 1:38 pm #2853147

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello,

To solve this issue you need to do a migration without ManageWP clone since the issue is happening due to migration, same is the case in the old ticket I shared above.

You can use some other plugins to migrate site such as Duplicator or manually migrate the site:
https://wordpress.org/plugins/duplicator/

Thanks

October 31, 2018 at 6:47 am #2864523

Maximilien HAIBI

My issue is resolved now. Thank you!

January 14, 2020 at 11:24 am #5288793

Pim

We do use ManagedWP and get the same error.

Fatal error: method_exists(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "unknown" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /var/www/dev/infosupportbusiness/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-templates.php on line 304

Any solution for this problem?