[Resolved] Problem activing WPML String Translation
This thread is resolved. Here is a description of the problem and solution.
Problem:
WPML String Translation wasn't being activated and when trying to activate, site's main menu and header were gone. There was a fatal error when trying to access Avada Options page and site was breaking.
For some reason, the main site was expecting to use FTP. This is why nothing actually worked. And nothing was being logged in debug.log.
By using Query Monitor, our team was able to find following error:
Fatal error: Uncaught Error: ftp_nlist(): Argument #1 ($ftp) must be of type FTP\Connection, null given
in /wp-admin/includes/class-wp-filesystem-ftpext.php on line 427
Call stack:
ftp_nlist()
wp-admin/includes/class-wp-filesystem-ftpext.php:427
WP_Filesystem_FTPext::exists()
wp-content/themes/Avada/includes/class-avada-server-rules.php:177
Avada_Server_Rules::is_htaccess_writable()
wp-content/themes/Avada/includes/options/performance.php:53
avada_options_section_performance()
wp-content/themes/Avada/includes/class-avada-options.php:155
Avada_Options::set_sections()
wp-content/themes/Avada/includes/class-avada-options.php:107
Avada_Options::__construct()
wp-content/themes/Avada/includes/class-avada-options.php:124
Avada_Options::get_instance()
wp-content/themes/Avada/includes/class-avada.php:716
Avada::get_options()
wp-content/themes/Avada/includes/class-avada-avadaredux.php:30
Avada_AvadaRedux::init_fusionredux()
wp-includes/class-wp-hook.php:308
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:332
WP_Hook::do_action()
wp-includes/plugin.php:517
do_action()
wp-settings.php:623
require_once()
wp-config.php:104
require_once()
wp-load.php:50
require_once()
wp-admin/admin.php:34
require_once()
wp-admin/themes.php:10
Solution:
Team fixed the issue by adding:
define('FS_METHOD', 'direct');
to wp-config.php file.
This seems to work with:
- String Translation - no crashes
- Visiting Avada Options - no crashes
- Front-end - the menu displays just properly now when WPML String Translation is enabled.
This is also actually the reason why no error log was created in the first place.
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.
Hello!
I am trying to access your FTP to check the debug log.
Something that bothers me is that when visiting /wp-admin/themes.php?page=avada_options I get error 500, but I see nothing in the error log and currently I cannot see that even if the error log is created because I cannot connect to your FTP.
I tested even with WPML String Translation disabled and the result is the same. This makes me believe that there might be something corrupted in your Avada settings that could be causing all of the troubles.
Can you enable debugging and visit that page - /wp-admin/themes.php?page=avada_options and provide me the error log?
About the header/menu - I diagnosed that there is a style applied to it "fusion-animated" which when WPML String Translation is enabled results in hiding the header. This could be due to custom CSS from your Avada options.
I hadn't seen that you couldn't access the AVADA options.
I have deactivated WPML Multilingual CMS and it is possible to access the template options.
If you want to check the custom CSS, you can do it by disabling the WPML plugins. Note that the staging site hidden link works with the same CSS.
As for FTP, I don't understand why you can't connect. I connect via FileZilla and I have no problem. If you want me to send you the access data again?
Okay, I see that you disabled WPML. I am still not managing to access the debug log - if it was created.
Furthermore, I again am facing the same issue where I am blocked from accessing your site - the site returns connection timeout.
I still think that there might be something wrong with your other plugins (as now WPML is completely disabled) or in your hosting.
Your colleague Wabas Bin Hasan already reviewed the plugins and found nothing relevant, "I found a couple of plugins throwing notices but those are not relevant to WPML."
We have already checked everything and the problem is only on the production site and with WPML plugins
For me there is no access block, I don't understand the problem.
I just made another staging site hidden link and I have been able to activate all the plugins without problems.
I send you the debug.log file: hidden link
I don't know what we can do more. My client can't wait any longer. I hope for a solution as soon as possible and if we don't find it I will be forced to change the translation plugin.
As a matter of fact, which you have also observed, that this problem is only happening on your production site, while staging sites just work fine. This usually happens because production sites are more taken care than a dev or staging site. So there are chances that something which is configured primarily for the production site, is causing the problem.
This is somehow evident by visiting /wp-admin/themes.php?page=avada_options page, which is throwing a 500 Internal Server Error. This error is thrown when a process is broken down in the midst of an execution thus provoking a complete site breakdown.
Since this error is happening on an underlying process, it might not be visible enough to you. Our team suspects there might be some either server security or server limit that we are hitting there. And suggests checking the server logs - as probably the user (server admin) tailored the PHP config to not report properly the errors. Because in debug.log we are not finding any relevant information which may give any hint to a possible cause.
As of previous retries, we observed that even when WPML is not active, the site is locking us out, means, we can not connect neither to the FTP nor WordPress Admin (even after a simply action on the site like deactivating a plugin). This is a clear sign that something on your production server is kicking in. It could be anything from a Security implementation to a configuration malfunction, which is preventing us to make any progress.
In short, we not only need to check the debug.log (WordPress error log) but we also need to look into server logs. These logs can be obtained from your server/hosting provider, or, if you manage the server yourself, you can find these in you server admin panel (i.e. cPanel or WHM) under the relevant section. Once you have the logs, please upload somewhere (i.e. hidden link) and share the link(s) for download.
I've enabled your next reply as private again to share these logs safely.
Our team found in the last error log in the package, with date 20230501, that mod_security being enabled and doing its job (locking us out due to internal errors):
It is very possible that this is what causes the issue. Team suggests disabling that.
You should speak with your hosting company because this is something that they should be able to check better than us. They should have the more detailed logs as well.
Meanwhile team is trying to check why the menu is being hidden.
Just an added note to the previous comment that we've been again locked out. So it is better to fix the above mentioned and let us know that we can proceed further.
Hi,
I have spoken with server support and the problem may be due to the fact that there is a security block on connexions from China that may affect other connections from Asia.
There are only restrictions on connections from China and Russia. There are no more restrictions on accessing the server via FTP
Is it possible to take the tests from another area?
I saw that WPML String Translation is active and still have the same problem. As soon as it can be deactivated, please tell me to activate it so that the website works.
I have verified that without the plugin I can translate almost everything and now I only have problems with the EVENTS CALENDAR plugin which does not show the page in the translation.
Have you made any progress? My client can't wait any longer and I need a solution this week or I'm going to have to try another translation plugin.
Hello!
I have some progress.
For some reason, your main site was expecting to use FTP.
This is why nothing actually worked.
I think that I fixed the issue by adding:
define('FS_METHOD', 'direct');
to your wp-config.php file
This seems to work with:
- String Translation - no crashes
- Visiting Avada Options - no crashes
- Front-end - the menu displays just properly now when WPML String Translation is enabled.
This is also actually the reason why no error log was created in the first place.
I checked the issue that you reported for The Events Calendar.
This seems like a new known issue that our compatibility team has debugged.
I applied the workaround:
Open the wp-content\plugins\the-events-calendar\src\Tribe\Integrations\WPML\Views\V2\Filters.php file
Replace line 188:
I don't understand the problem but I'm very happy that it was finally solved.
Tthank you so much, good job!.
Regards,
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.