• Closed
  • Scott Lemon
    Spectator
    August 16, 2023 at 5:50 pm #49035

    We recently upgraded a customer website that was very old. Everything appears to be working, except for the Evolve Plus theme. When we activate the theme, the site has the “PHP Fatal error” below. All plugins are deactivated. If we switch back to a plain theme the site works. Back to Evolve Plus and it fails.

    The server is running Apache and PHP v8.1. WordPress was upgraded to v6.2.2 (just before v6.3 was released)

    The Evolve Plus Theme is v3.0.5

    The Error is:

    [16-Aug-2023 15:40:25 UTC] PHP Fatal error: Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /var/www/wordpress/www.website.com/wp-admin/includes/class-wp-filesystem-ftpext.php:427
    Stack trace:
    #0 /var/www/wordpress/www.website.com/wp-admin/includes/class-wp-filesystem-ftpext.php(427): ftp_nlist()
    #1 /var/www/wordpress/www.website.com/wp-admin/includes/class-wp-filesystem-base.php(229): WP_Filesystem_FTPext->exists()
    #2 /var/www/wordpress/www.website.com/wp-admin/includes/class-wp-filesystem-base.php(58): WP_Filesystem_Base->find_folder()
    #3 /var/www/wordpress/www.website.com/wp-content/themes/evolve-plus/inc/admin/customizer/customizer.php(1225): WP_Filesystem_Base->abspath()
    #4 /var/www/wordpress/www.website.com/wp-content/themes/evolve-plus/inc/admin/customizer/customizer.php(1181): evolve_get_controls_from_json()
    #5 /var/www/wordpress/www.website.com/wp-includes/class-wp-hook.php(308): evolve_load_the_theme_options()
    #6 /var/www/wordpress/www.website.com/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #7 /var/www/wordpress/www.website.com/wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 /var/www/wordpress/www.website.com/wp-settings.php(623): do_action()
    #9 /var/www/wordpress/www.website.com/wp-config.php(89): require_once('...')
    #10 /var/www/wordpress/www.website.com/wp-load.php(50): require_once('...')
    #11 /var/www/wordpress/www.website.com/wp-cron.php(46): require_once('...')
    #12 {main}
    thrown in /var/www/wordpress/www.website.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 427

    This APPEARS to be related to WordPress maybe passing some bad value to the Evolve Plus theme? I found numerous posts about a similar error and being told to set the “FS_METHOD” to “direct” in the config file but this does not work and makes no difference.

    Any suggestions on what might be causing this and how we would edit the database or make some other change to fix this?

    We are an extremely technical team and well versed at debugging and writing plug-ins, but are having a hard time tracking down where this is going wrong.

    Evgeny
    Keymaster
    Posts: 988
    August 16, 2023 at 5:59 pm #49036

    Hi. I’m sorry to hear that your client’s server is down for two days. That’s why having backups or working with staging websites is a good idea. Please send me access to the website’s admin area and an FTP. You can do it safely in a private message. Thanks!

    Scott Lemon
    Spectator
    Posts: 17
    August 16, 2023 at 6:07 pm #49037

    Hello,

    Yes, backups would not have helped in this case as the site was down when we got involved. They applied a server update that broke things badly. We are now doing a full reinstall on a new server and have the old server as a non-working backup. :-/

    As a new returning user of these forums, I can’t find how to send you a private message at all. 🙁

    How do I do that?

    Evgeny
    Keymaster
    Posts: 988
    August 16, 2023 at 6:08 pm #49038

    When you are sending a message on the forum, check the box below that says “Set this as a private reply”

    Scott Lemon
    Spectator
    Posts: 17
    August 16, 2023 at 6:10 pm #49039
    This reply has been marked as private.
    Evgeny
    Keymaster
    Posts: 988
    August 16, 2023 at 6:14 pm #49040
    This reply has been marked as private.
    Scott Lemon
    Spectator
    Posts: 17
    August 16, 2023 at 6:20 pm #49041
    This reply has been marked as private.
    Evgeny
    Keymaster
    Posts: 988
    August 16, 2023 at 6:48 pm #49042
    This reply has been marked as private.
    Scott Lemon
    Spectator
    Posts: 17
    August 16, 2023 at 6:49 pm #49043

    Looking at the WordPress code, there seems to be multiple class files for the file system:

    class-wp-filesystem-base.php
    class-wp-filesystem-direct.php
    class-wp-filesystem-ftpext.php

    And the “wrong” one is being used … ftpext instead of direct.

    Do you have any insights into how this selection is being controlled?

    Evgeny
    Keymaster
    Posts: 988
    August 16, 2023 at 6:55 pm #49044

    Yes, that’s why I wanted to check the configuration. It is usually about server environment and permissions – whether WordPress can or cannot write directly to the file system. It looks like it “thinks” that it cannot. Did you check all permissions of the user and the files? Maybe it makes sense to talk to hosting support?

    Scott Lemon
    Spectator
    Posts: 17
    August 16, 2023 at 8:57 pm #49045

    I am the hosting provider. 🙂 Or rather AWS is.

    Yes, I am seeing the same symptom. WordPress seems to think it does not have “direct” file system access and so is defaulting to ftp. I can’t find anywhere that the settings are not correct. And I’ve been comparing to the old server … they seem to look the same.

    Thank you for your thoughts and tips … and I’m going to continue to dig. If I find something I’ll post back here.

    I wish I knew WHERE WordPress was testing the permissions that it feels they are not correctly set.
    :-/