RM Fatal Error – FS_METHOD of ftpext Solution

Some users are Experiencing a Fatal Error on every page load once they’ve updated the Responsive Menu plugin to version 4.1.8 or above.

According to our investigation, this is probably a WordPress core File Structure issue. As per the WordPress.org guidelines, we cannot alter the filesystem($wp_filesystem) function so unfortunately, there is not much we can do from our end.

The issue has been highlighted by other developers too and WordPress.org will take note of your issue and hopefully fix it soon.

So you would need to follow these instructions if you are using the FS_METHOD or $wp_filesystem elsewhere other than our RM Plugin. We came up with two solutions for this problem:

Solution 1

Redefine define(‘FS_METHOD’, ‘direct’)

This function will allow you to redefine FS METHOD to direct if you are using any other method like the following:

  • ssh2
  • ftpext
  • ftpsockets

You can use the following filesystem_method hook based on your condition.

if (!function_exists("mysite_filesystem_method")) {
    function mysite_filesystem_method($method) {
        $method = is_admin() ? "direct" : $method;
        return $method;
    }
}
add_filter("filesystem_method", "mysite_filesystem_method");

Solution 2

Open your wp_config.php if you have defined FS_METHOD in any other method like ssh2, ftpex, etc. instead of direct

For example, use define('FS_METHOD', 'direct'); and not define('FS_METHOD', 'ftpext');

If FS_Method is not defined as direct, you will receive an error from the WP FileSystem. If you are using the WP CLI command then you need to follow the instructions directed by wordpress.org

Refer to this user comment to know more

If both the solutions don’t work connect with the Responsive Menu support and our support personnel will help you with this.