• Resolved gsc89

    (@gsc89)


    When trying to activate this plugin in a Bedrock based install I get this error:


    Fatal error: Uncaught TypeError: ftp_mkdir(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /app/web/wp/wp-admin/includes/class-wp-filesystem-ftpext.php:580 Stack trace: #0 /app/web/wp/wp-admin/includes/class-wp-filesystem-ftpext.php(580): ftp_mkdir() #1 /app/web/app/plugins/image-regenerate-select-crop/inc/debug.php(362): WP_Filesystem_FTPext->mkdir() #2 /app/web/app/plugins/image-regenerate-select-crop/inc/debug.php(41): SIRSC\Debug\ensure_index() #3 /app/web/app/plugins/image-regenerate-select-crop/image-regenerate-select-crop.php(323): SIRSC\Debug\check_log_prefix() #4 /app/web/wp/wp-includes/class-wp-hook.php(310): SIRSC_Image_Regenerate_Select_Crop::activate_plugin() #5 /app/web/wp/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() #6 /app/web/wp/wp-includes/plugin.php(517): WP_Hook->do_action() #7 /app/web/wp/wp-admin/plugins.php(194): do_action() #8 {main} thrown in /app/web/wp/wp-admin/includes/class-wp-filesystem-ftpext.php on line 580

    I assume this is likely because of file modifications are not turned on in this type of install? Typically there is no problem doing file stuff in uploads but when i look in the code its trying to make a logs directory inside the plugin folder?

    Is there a way I can just prevent logging? or move it to the /uploads/ folder with a filter / config?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hi,
    Thanks for letting me know. I will look into this and update you when I have more details.

    Regards,
    Iulia

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hi,

    There is a new release that includes changed for moving the logs to uploads folder. Please update and let me know if the issue is gone.

    Regards,
    Iulia

    Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hello,

    I haven’t heard back from you in a while so I will mark this as resolved. You can start a new thread if you have other questions.

    Regards,
    Iulia

    Thread Starter gsc89

    (@gsc89)

    Sorry I was on holiday.


    Fatal error: Uncaught TypeError: ftp_mkdir(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /app/web/wp/wp-admin/includes/class-wp-filesystem-ftpext.php:580 Stack trace: #0 /app/web/wp/wp-admin/includes/class-wp-filesystem-ftpext.php(580): ftp_mkdir() #1 /app/web/app/plugins/image-regenerate-select-crop/inc/debug.php(383): WP_Filesystem_FTPext->mkdir() #2 /app/web/app/plugins/image-regenerate-select-crop/inc/debug.php(60): SIRSC\Debug\ensure_index() #3 /app/web/app/plugins/image-regenerate-select-crop/image-regenerate-select-crop.php(324): SIRSC\Debug\check_log_prefix() #4 /app/web/wp/wp-includes/class-wp-hook.php(310): SIRSC_Image_Regenerate_Select_Crop::activate_plugin() #5 /app/web/wp/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() #6 /app/web/wp/wp-includes/plugin.php(517): WP_Hook->do_action() #7 /app/web/wp/wp-admin/plugins.php(194): do_action() #8 {main} thrown in /app/web/wp/wp-admin/includes/class-wp-filesystem-ftpext.php on line 580

    I still get this on activation.

    There is no FTP connection in a site setup using bedrock. https://roots.io/bedrock/

    This is done in the name of security so these are set to false:

    // Disable the plugin and theme file editor in the admin
    Config::define(‘DISALLOW_FILE_EDIT’, true);

    // Disable plugin and theme updates and installation from the admin
    Config::define(‘DISALLOW_FILE_MODS’, true);

    Typically I would work around this by creating files / folders needed manually but I am not sure this will work here, do you know a what directories and files I should try adding manually? Or is it possible to disable this aspect of the plugin? by a filter for example so I can just use it without it trying to do this stuff?




    Plugin Author Iulia Cazan

    (@iulia-cazan)

    Hi,

    I just released a new version of the plugin and added a new filter for bypassing the logs, I hope I understood what you are aiming for. I have tried on my environments to replicate a similar scenario like what you mentioned but could not replicate the issue.

    Please upgrade and try to add your code like this:
    add_filter( 'sirsc_bypass_logs', '__return_true' );

    Let me know if that helped.

    Regards,
    Iulia

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Error Activation – logs creation?’ is closed to new replies.