The results in the error log when Depicter alone is active on a default WordPress theme:
Fatal error: Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type resource, null given in /home/xxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-admin/includes/class-wp-filesystem-ftpext.php:420 Stack trace: #0 /home/xxxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-admin/includes/class-wp-filesystem-ftpext.php(420): ftp_nlist() #1 /home/xxxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-content/plugins/depicter/modules/wpemerge-app-core/src/Assets/Assets.php(114): WP_Filesystem_FTPext->exists() #2 /home/xxxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-content/plugins/depicter/modules/wpemerge-app-core/src/Assets/Assets.php(201): WPEmergeAppCore\Assets\Assets->generateFileVersion() #3 /home/xxxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-content/plugins/depicter/app/src/WordPress/AssetsServiceProvider.php(36): WPEmergeAppCore\Assets\Assets->enqueueStyle() #4 /home/xxxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-includes/class-wp-hook.php(308): Depicter\WordPress\AssetsServiceProvider->enqueueAdminAssets() #5 /home/xxxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #6 /home/xxxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-includes/plugin.php(517): WP_Hook->do_action() #7 /home/xxxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-admin/admin-header.php(118): do_action() #8 /home/xxxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-admin/plugins.php(605): require_once('/home/xxxxx.cl…') #9 {main} thrown in /home/xxxxx.cloudwaysapps.com/xxxxx/public_html/staging-marlon/wp-admin/includes/class-wp-filesystem-ftpext.php on line 420
Plugin Author
averta
(@averta)
Hi. Thank you for reporting this. It seems that the core issue is that the web server user is not the owner of the site files and thus WordPress will attempt to use FTP-based functions for some requests. Most probably fixing the file ownership issue will take care of the situation. To be more specific, passing a null value to ftp_pwd, ftp_chdir and ftp_nlist throws a warning in PHP 7.4 and a fatal in PHP 8+. We will pass this to our development team for a possible improvement in our code but as I said, the main problem is a permission issue.
Thank you for pointing me in the right direction. It was indeed a server permissions issue. Cloudways fixed the server permissions and then added define('FS_METHOD','direct'); to my wp-config.php file which appears to have resolved the fatal error. Many thanks!
Plugin Author
averta
(@averta)
@midihead
I am happy I could help, and thanks for using Depicter.
It would be great if you can give us a 5* rate if you think we deserve it from here https://wordpress.org/support/plugin/depicter/reviews/#new-post
Regards