• Resolved SirLouen

    (@sirlouen)


    I cant upgrade plugins from certain mainwp child.
    I’ve noticed that mainwp says that cannot write the folders, but the folders have full write and read access (777)

    How can I debug this issue?

    PS: I’ve found that when I go into “connection details” this error appear

    #0 /wp-content/plugins/mainwp-child/class/class-mainwp-helper.php(115): MainWP\Child\MainWP_Helper::check_dir()
    #1 /wp-content/plugins/mainwp-child/class/class-mainwp-clone-page.php(348): MainWP\Child\MainWP_Helper::get_mainwp_dir()
    #2 /wp-content/plugins/mainwp-child/class/class-mainwp-clone-page.php(323): MainWP\Child\MainWP_Clone_Page::render_clone_from_server()
    #3 /wp-content/plugins/mainwp-child/class/class-mainwp-pages.php(334): MainWP\Child\MainWP_Clone_Page::render_normal_restore()
    #4 /wp-includes/class-wp-hook.php(287): MainWP\Child\MainWP_Pages->render_pages()
    #5 /wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()
    • This topic was modified 3 years, 11 months ago by SirLouen.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter SirLouen

    (@sirlouen)

    I think I’ve found the problem

    link property is not being initialized from WP_Filesystem_Base (WP_Filesystem_FTPExt Class), therefore methods like ftp_nlist and ftp_mkdir are receiving null for the first parameter.

    Essentially, at the moment that $wp_filesystem in file wp-content/plugins/mainwp-child/class/class-mainwp-helper.php, line 145 it is NOT initialized, (you can trace it down to see that is NULL at that moment):

    $wp_fielsystem->link

    In my case, I’m using ftpext for FS_METHOD and I’m willing to use it for security reasons

    Solution/Conclusion?

    I think you cannot simply just call global $wp_filesystem, it must be initialized before being used.

    https://pippinsplugins.com/introduction-wp-filesystem/

    Plugin Author mainwp

    (@mainwp)

    Please review this KB Article Required FS_METHOD

    If that doesn’t help please open a support ticket.

    Thread Starter SirLouen

    (@sirlouen)

    According to the code, FS_METHOD ftpext is checked during the checkings so technically it was compatible at some point and now is legacy code?

    FS_METHOD direct is too unsafe for my sites.

    Plugin Support Bogdan Rapaic

    (@bogdanrapaic)

    Hi @sirlouen, at the moment, the ‘direct’ FS_METHOD is required.

    Plugin Author mainwp

    (@mainwp)

    Hi @sirlouen,

    I will go ahead and resolve this support request. For additional help, please feel free to open a helpdesk ticket.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can’t upgrade plugins’ is closed to new replies.