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.
Tagged: Bug, Performance
This topic contains 45 replies, has 4 voices.
Last updated by Waqas Bin Hasan 1 year, 8 months ago.
Assisted by: Waqas Bin Hasan.
Author | Posts |
---|---|
April 28, 2023 at 7:48 am #13555249 | |
George Botsev Supporter
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
Hello! 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. |
April 28, 2023 at 8:20 am #13555499 | |
jordiB-11 |
Hi, I hadn't seen that you couldn't access the AVADA options. Regards, |
April 28, 2023 at 8:51 am #13555863 | |
George Botsev Supporter
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
Okay, I see that you disabled WPML. I am still not managing to access the debug log - if it was created. |
April 28, 2023 at 1:49 pm #13557959 | |
jordiB-11 |
hi, 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. Regards |
May 2, 2023 at 10:08 am #13569693 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Hi, Thank you for your cooperation and the updates. 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. Looking forward. |
May 5, 2023 at 5:32 am #13590657 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Hi, Thank you for providing the logs and FTP access. I've forwarded to the team and 'll update you as soon as I hear back. Regards. |
May 5, 2023 at 12:42 pm #13594527 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Hi, 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): [2023-05-01 02:00:33.502491] [-:error] [pid 2499733:tid 140423638628096] [client 191.102.179.12:31062] [client 191.102.179.12] ModSecurity: Access denied with code 403 (phase 2). Match of "rx ://%{SERVER_NAME}/" against "MATCHED_VAR" required. [file "/etc/httpd/modsecurity.d/activated_rules/10_asl_rules.conf"] [line "81"] [id "340012"] [rev "3"] [msg "Atomicorp.com UNSUPPORTED DELAYED Rules: Unauthorized Proxy access attempt"] [data "http:/"] [severity "CRITICAL"] [hostname "museosyespacioscorporativos.org"] [uri "/"] [unique_id "ZE8dQeQtjjftcB1MxvrX8gAAAQE"] 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. I'll update you as soon as I've more information. Regards. |
May 5, 2023 at 12:44 pm #13594533 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
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. |
May 5, 2023 at 1:39 pm #13594869 | |
jordiB-11 |
Hi, I will consult the server support team and I will tell you something. Regards, |
May 5, 2023 at 1:55 pm #13594929 | |
jordiB-11 |
Hi, 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? Regards, |
May 8, 2023 at 4:50 am #13601677 | |
Waqas Bin Hasan Supporter
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
Hi, Thank you for the details. I've forwarded the information to the team and 'll update you on this accordingly. Regards. |
May 9, 2023 at 6:51 am #13609983 | |
jordiB-11 |
Hi, 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. Regards, |
May 9, 2023 at 12:32 pm #13613815 | |
George Botsev Supporter
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
Hello! define('FS_METHOD', 'direct'); to your wp-config.php file This seems to work with: This is also actually the reason why no error log was created in the first place. |
May 9, 2023 at 12:54 pm #13613991 | |
George Botsev Supporter
Languages: English (English ) Timezone: Europe/Sofia (GMT+02:00) |
I checked the issue that you reported for The Events Calendar. Open the wp-content\plugins\the-events-calendar\src\Tribe\Integrations\WPML\Views\V2\Filters.php file $event->permalink = apply_filters( 'wpml_permalink', $event->permalink ); With: // WPML Workaround for compsupp-6706 $event_permalink = $event->permalink; if ( is_object($event_permalink) ) { $event_permalink = (string)$event_permalink; } $event->permalink = apply_filters( 'wpml_permalink', $event_permalink ); This seems to fix the issue. |
May 9, 2023 at 2:12 pm #13614697 | |
jordiB-11 |
Hi, I don't understand the problem but I'm very happy that it was finally solved. Regards, |