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:
Fatal error: Cannot redeclare _wpml_api_allowed_content_type() (previously declared in C:\xampp\htdocs\WPML\wp-content\plugins\sitepress-multilingual-cms\inc\wpml-api.php:25) in C:\xampp\htdocs\WPML\wp-content\plugins\sitepress-multilingual-cms\inc\wpml-api.php on line 34

Solution:

The problem is Memsource Translation Plugin for WordPress and WooCommerce Multilingual plugin. Both plugin adding the same file to the systems resulting in this error.
Our team is checking that how can we fix the issue either in our plugin or contacting the Memsource plugin author.

Meanwhile, you can patch this error by following these steps:-

#1 Please make a complete backup of site files and database (Just a good practice)
#2 Then edit this file here \sitepress-multilingual-cms\sitepress.class.php
#3 On line number 458 replace

require WPML_PLUGIN_PATH . '/inc/wpml-api.php';

with

require_once WPML_PLUGIN_PATH . '/inc/wpml-api.php';

This should fix the issue.

100% of people find this useful.

This topic contains 14 replies, has 3 voices.

Last updated by Sumit 2 months, 1 week ago.

Assigned support staff: Riffaz.

Author Posts
July 14, 2019 at 11:40 am #4205437

jenniferE-5

Hello,

I've been having some trouble with WPML and Memsource. I've just updated to the latest versions of WPML Multilingual CMS, WPML String Translation and WPML Translation management, and I also need to install Memsource as the agency we work with uses this plug in to complete translations. When I install and activate the plug in however, I get an error message across the whole site. When entering WordPress safe mode, WPML shows an E_Error as shown in the screenshot.

Thanks

July 14, 2019 at 12:28 pm #4205473

Riffaz
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support.

The error means that a function used by WPML is already in use or declared somewhere else.
Most probably this is with your translation service.

We need to check this in a fresh, bug free environment.

please,
1. go to hidden link
2. install Memsource
3. configure the WPML as you have it on your site. at the last step just click next (site key)
4. try to activate them both
5. recreate the issue.
6. let us know how to check this and how to recreate this issue.
7. explain the step 8 with screenshots and URLs for better understanding.

Regards,
Riffaz.

July 15, 2019 at 9:41 am #4209293

jenniferE-5

Hi Riffaz,

Thanks for getting back to me so quickly.

I've tried to set up the sandbox site up in exactly the same way and managed to successfully activate all plug ins, without being able to recreate the error message. I guess this means that it's either something to do with the way in which I've installed the plug ins or completed an update? Or something else is interfering? What would you recommend as a next step/test?

Thanks again,

Jennifer

July 16, 2019 at 9:54 am #4218515

jenniferE-5

Hi Riffaz,

Thanks for this. Just a quick message to let you know that the migration is now complete.

Please let me know if you need anything else.

Thanks

July 16, 2019 at 2:15 pm #4220967

Riffaz
Supporter

Languages: English (English )

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

Hi,

Thank you for this.

We need the site login details to check the migration site.
Your live site and the migration site logins are same.
I am setting the next reply as private.
Let me know your site login details to proceed further, please.

Regards,

July 17, 2019 at 9:53 am #4228373

jenniferE-5

Can I check this message is definitely private? I submitted, and it appeared as a normal one!

July 17, 2019 at 2:15 pm #4231177

Riffaz
Supporter

Languages: English (English )

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

Oh, not sure what happened.
I am making the next reply private again.

regards,

July 18, 2019 at 2:12 pm #4239539

Riffaz
Supporter

Languages: English (English )

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

Hi,

Thank you for the details but the details are incorrect: hidden link

I think you created this user in your site after I migrated.
That will not work in the migrated site.

Please let me know a username and password that you had in your site before the migration.
The next reply is private.

Regards,
Riffaz.

July 19, 2019 at 10:43 am #4245851

jenniferE-5

Hi Riffaz,

The previous private message that I sent you should have included two sets of log in details but for some reason they are only displaying one! Once again, this message is not private, please could you reset the next one so I can re-send the log in details.

Thanks,

July 21, 2019 at 2:54 pm #4252611

Riffaz
Supporter

Languages: English (English )

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

Hi,

Actually I got only one and it does not work. 🙂

The next reply is private: hidden link

Regards,

July 28, 2019 at 11:14 am #4295419

Riffaz
Supporter

Languages: English (English )

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

Hi,

In the migrated site also I do not see any issue/error: hidden link

you can check by login to hidden link using your username and password.

Do you still see this issue hidden link on your live site?
I could not check it on your live site because it asks for .htacces or folder protection password as well: hidden link

Let me know how it goes.

Regards,

July 29, 2019 at 1:19 pm #4300111

jenniferE-5

Hi Riffaz,

The error occurs when Memsource is installed and activated - this seems to trigger an issue with WPML. I've just done this on the migrated site and can now see this (see screenshot).

Thanks

July 30, 2019 at 8:42 am #4305799

Riffaz
Supporter

Languages: English (English )

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

Hi,

I escalated this to second tier.
Please be patient till we get back to you.

Regards,

August 7, 2019 at 6:50 am #4352335

Riffaz
Supporter

Languages: English (English )

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

Hi,

I am updating you that our team found minor compatible issue between the Memsource and WPML.
We will update you soon with the solution or workaround.

Regards,

August 7, 2019 at 3:21 pm #4356477

Sumit
Supporter

Languages: English (English )

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

Hi,

I am Sumit from 2nd tier support. Sorry for the inconvenience.

The problem is Memsource Translation Plugin for WordPress and WooCommerce Multilingual plugin. Both plugin adding the same file to the systems resulting in this error.
Our team is checking that how can we fix the issue either in our plugin or contacting the Memsource plugin author.

Meanwhile, you can patch this error by following these steps:-

#1 Please make a complete backup of site files and database (Just a good practice)
#2 Then edit this file here \sitepress-multilingual-cms\sitepress.class.php
#3 On line number 458 replace

 
require WPML_PLUGIN_PATH . '/inc/wpml-api.php';

with

require_once WPML_PLUGIN_PATH . '/inc/wpml-api.php';

This should fix the issue.

Thanks