Incompatible with Bedrock / alternative folder structure
-
Hi there,
very much anticipated using this this plugin since it exactly seems to be doing what we need to achieve: Import images form a (synched) server folder and do so in a regular fashion via Cron event which handily is also included!
Unfortunately the plugin produces an error as soon as I try to select a folder under “Select Register” other then the uploads-folder (which has an empty option value).
The issue is, that our folder structure is different from regular WP installations (we use Bedrock) and thus the paths are recognized falsely to begin with…
Read more about the issue and the proposed solution here: https://roots.io/docs/bedrock/master/compatibility/
Excerpt:
If a plugin or theme works with a vanilla WordPress install and not with Bedrock, the plugin or theme is likely at fault: In most cases, it is hard-coding assumptions about directory structure or file location and ignoring the systems WordPress has in place to determine those things dynamically.
This is the error message taken from the log:
2021/06/08 09:22:53 [error] 904#904: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/srv/www/mysite.com/releases/20210608092139/web/app/uploadshttps://mysite.com/app/uploads/rclone): failed to open dir: No such file or directory in /srv/www/mysite.com/releases/20210608092139/web/app/mu-plugins/bulk-media-register/lib/class-bulkmediaregister.php:122 Stack trace: #0 /srv/www/mysite.com/releases/20210608092139/web/app/mu-plugins/bulk-media-register/lib/class-bulkmediaregister.php(122): RecursiveDirectoryIterator->__construct('/srv/www/hackeu...', 4096) #1 /srv/www/mysite.com/releases/20210608092139/web/app/mu-plugins/bulk-media-register/lib/class-bulkmediaregister.php(444): BulkMediaRegister->scan_file('/srv/www/hackeu...', 'all', true, '/^(?!.*(-[0-9]+...', false, Array, Array, 1, 1623144173, 2880) #2 /srv/www/mysite.com/releases/20210608092139/web/wp/wp-includes/class-wp-hook.php(292): BulkMediaRegister->search_files(1, false)" while reading response header from upstream, client: 95.91.214.80, server: multi.hackeundspitze.xyz, request: "POST /wp/wp-admin/admin.php?page=bulkmediaregister-selectregister HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm-wordpress.sock:", host: "multi.hackeundspitze.xyz", referrer: "https://mysite.com/wp/wp-admin/admin.php?page=bulkmediaregister-selectregister"
Would it be possible to fix the issue and make the plugin more “structure-agnostic”?
Looking forward to using the plugin and we’ll gladly support the development.
Thanks & regards,
Henning
- The topic ‘Incompatible with Bedrock / alternative folder structure’ is closed to new replies.