Resolved

Resolved in: 3.7.0

Symptoms

Some problems might be experienced when the WPML plugin’s folder is installed in a custom location and a symlink pointing to it from the usual wp-content/plugins folder is used.

Workaround

This issue will be fixed in WPML 3.7.0. Meanwhile, use the following patch as a workaround.

Step 1.

Go to the ../plugins/sitepress-multilingual-cms folder and edit the sitepress.php  on line 24.

Replace the whole following block:

Original Code
define( 'ICL_PLUGIN_PATH', dirname( __FILE__ ) );
define( 'ICL_PLUGIN_FILE', basename( __FILE__ ) );
define( 'ICL_PLUGIN_FULL_PATH', basename( ICL_PLUGIN_PATH ) . '/' . ICL_PLUGIN_FILE );
define( 'ICL_PLUGIN_FOLDER', basename( ICL_PLUGIN_PATH ) );

With:

Replacement Code
define( 'ICL_PLUGIN_FULL_PATH', plugin_basename( __FILE__ ) );
define( 'ICL_PLUGIN_FOLDER', dirname( ICL_PLUGIN_FULL_PATH ) );
define( 'ICL_PLUGIN_PATH', WP_PLUGIN_DIR . '/' . ICL_PLUGIN_FOLDER );
define( 'ICL_PLUGIN_FILE', basename( ICL_PLUGIN_FULL_PATH ) );

Step 2.

Go to the ../plugins/sitepress-multilingual-cms/menu folder and edit the languages.php  on line 5.

Replace the following line:
if(!is_plugin_active(basename(dirname(dirname(__FILE__))) . "/sitepress.php")){

With:
if ( ! is_plugin_active( ICL_PLUGIN_FULL_PATH ) ) {

6 Responses to “Issues when WPML plugin folder is a symbolic link”

  1. I bought your program because I need tp translate my Italian real estate web site in English and in French. I have already the pages done in Italian, but I do not understand how to use your program to translate.
    You sent me many Zip. Do I need to download all of them to my computer?
    I am looking forward to hearing from you and receive your help.
    chiara marras