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

Last updated by alexanderM-60 3 weeks, 1 day ago.

Assigned support staff: Lauren.

Author Posts
August 19, 2019 at 5:15 pm #4417599

alexanderM-60

Tell us what you are trying to do?
Trying to activate WPML
Is there any documentation that you are following?
None. Since it involves just installing and activating
Is there a similar example that we can see?
hidden link
What is the link to your site?
hidden link BTW How do I share password information if this is not private?

August 19, 2019 at 7:09 pm #4418755

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

I would need to see the detail of the error to get a better idea of the issue you are experiencing.

You can see how to enable debug logging here:
https://wpml.org/documentation/support/debugging-wpml/

Go in your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
define('WP_DEBUG', true);

Edit your wp-config.php file and add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

This will create an error_log.txt file in your site's root directory. Please send me its contents.

If you wish to share your access details i have enabled the private field reply for you to do so.

Please make sure to create a full backup before doing so

August 20, 2019 at 7:51 pm #4426203

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

If possible please provide me with your FTP access as at the moment i am limited to WP FILE Manager plugin which is not a safe practice in case activating WPML causes the error again i wont be able to manually deactivate it

additionally after checking your wp-config.php on the site i can see that any error logging/debugging is currently missing

adding the lines provided earlier takes a while to create an error log sometimes

also you can enabled wp_debug_display and this will allow us to see the error you are getting when activating WPML

/* ERROR LOGGING */
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DSIPLAY', true );

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
August 21, 2019 at 6:08 pm #4434463

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

The following is the error generated.

I was not able to access the FTP but i created a duplicator package on my local install and was able to retrieve the error log.

Fatal error: Uncaught Error: Call to a member function is_enabled() on string in /Applications/MAMP/htdocs/sparx/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php:346
Stack trace:
#0 /Applications/MAMP/htdocs/sparx/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-inline-styles.php(274): WPML_LS_Settings->get_active_slots()
#1 /Applications/MAMP/htdocs/sparx/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-admin-ui.php(105): WPML_LS_Inline_Styles->admin_output()
#2 /Applications/MAMP/htdocs/sparx/wp-includes/class-wp-hook.php(286): WPML_LS_Admin_UI->admin_head_action('')
#3 /Applications/MAMP/htdocs/sparx/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#4 /Applications/MAMP/htdocs/sparx/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#5 /Applications/MAMP/htdocs/sparx/wp-admin/admin-header.php(149): do_action('admin_head')
#6 /Applications/MAMP/htdocs/sparx/wp-admin/plugi in /Applications/MAMP/htdocs/sparx/wp-content/plugins/sitepress-multilingual-cms/classes/language-switcher/class-wpml-ls-settings.php on line 346

There was a corrupted entry within your *_options table in the database and i ran the following SQL script to select the 'wpml_language_switcher' field which was causing this behavior

SELECT * FROM primam_options WHERE option_name = "wpml_language_switcher";

WPML should be enabled now as expected

August 23, 2019 at 12:26 pm #4447083

alexanderM-60

I really appreciate your debugging skills and it worked but when I started working with the site it causes the same issue again. hidden link Now I will have to disable WPML before I could work on the site. Can there be a permanent solution to this? Is there any conflict with other plugins and themes?

August 23, 2019 at 5:36 pm #4449219

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

I will need to see the error that populated , was this the same error as the original one . ?

The message from WordPress does not give us the actual error as it could another fatal error being triggered.

if possible please review your FTP details as it would make it easier for me to get the error log directly from the site

at the moment the FTP takes me to an empty directory

August 26, 2019 at 4:54 am #4455945

alexanderM-60

Can I get a permanent solution please?

August 26, 2019 at 7:18 pm #4461021

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hi there, Bobby is off for a few days so I'm stepping in to help out. I hope that is okay. As Bobby mentioned, the FTP credentials are taking me to a blank folder, so I have no way of accessing the debug log. Can you please double check the login details and update as needed? I have marked the next reply as private.

August 28, 2019 at 12:12 pm #4474181

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks, I was able to access via FTP and I can see that the debug log is not enabled. I enabled it now, but I am not able to access the WordPress dashboard to try to activate WPML. Please update the WordPress login credentials so that I can test this. I have marked the next reply as private.

August 28, 2019 at 11:43 pm #4477037

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks so much for sending access. I was able to log in and activate WPML without any error. Can you tell me exactly what you were working on when the error returned, so that I can try to reproduce? Please also leave the debug log enabled so I can see if any errors are thrown.

It could be a conflict with another plugin or theme. I suggest first updating all of your outdated plugins. If you still experience the issue, we can try temporarily disabling all non WPML plugins and switching to a default them to see if you can work on the site this way. if this is not something you can test on the live site, I'll be happy to set up a staging site for you.

Please let me know if the error returns, and the steps you took on the site leading up to it.

August 29, 2019 at 1:49 am #4477083

alexanderM-60

My issue is resolved now. Thank you!