Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
I'm trying to install WPML but I receive the error:

Fatal error: Cannot redeclare icl_get_home_url() (previously declared in wp-content/plugins/polylang/modules/wpml/wpml-compat.php:51) in /wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php on line 77

Solution:
Polylang and WPML have the same function so you should NOT install both of them on a website.

The issue "Fatal error: Cannot redeclare icl_get_home_url()..." can be resolved by disabling Polylang.

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

Last updated by stevenV-3 4 years, 1 month ago.

Assigned support staff: Dat Hoang.

Author Posts
June 8, 2016 at 2:54 pm #901836

stevenV-3

I am trying to: install WPML plugin on website where Polylang is installed (not by me, by previous webdesigner, otherwise I would have installed WMPL from the beginning!). Also the plugin "Event Manager" is installed on the website, but it seems that Polylang and Event Manager aren't compatibel. As I could read, WPML is compatible with Polylang and also with Event Manager.

URL of (my) website where problem appears: hidden link

I expected to see: On the page mentionned above, you can see in the calendar both languages of same event. I would like to see only the language corresponding to the website language

Instead, I got:

Steps to duplicate the issue: I'm trying to install WPML but I receive next error:

Fatal error: Cannot redeclare icl_get_home_url() (previously declared in /customers/6/d/0/forpeopleonthemove.eu/httpd.www/WPAG015/wp-content/plugins/polylang/modules/wpml/wpml-compat.php:51) in /customers/6/d/0/forpeopleonthemove.eu/httpd.www/WPAG015/wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php on line 77

Would installing WPML solve my problem of both languages mentionned in the calendar?

June 9, 2016 at 7:59 am #902810

Dat Hoang

Polylang and WPML have the same function so you should NOT install both of them on a website.
Moreover there is no declaration like this " WPML is compatible with Polylang".
But that's true for Events Manager https://wpml.org/plugin/events-manager/

I think the issue "Fatal error: Cannot redeclare icl_get_home_url()..." can be resolved by disabling Polylang.

For the issue related to Events Manager and WPML, please open a new ticket. In each ticket, we focus on only one problem. That helps others with the same problem find the solution quickly.

June 9, 2016 at 12:54 pm #903858

stevenV-3

Hi Dat Hoang,

Thanks for reply and info! Problem is now that It would take a lot of work to solve the problem that was created by webdesigner (by not checking compatibility between Polylang and Event Manager). Have to explain this to client but will take a lot of work to solve this issue (lots of pages in website).
Thanks again for support!

😉