Problem/Motivation
I get an error in the backend on the update page /admin/reports/updates/update:
Your site cannot be automatically updated until further action is performed.
PhpTuf\ComposerStager\Internal\Path\Factory\PathFactory::create(): Argument #1 ($path) must be of type string, bool given, called in /srv/www/virtual2/sitename/htdocs/web/modules/contrib/automatic_updates/package_manager/src/Event/CollectPathsToExcludeEvent.php on line 96
Steps to reproduce
Drupal core 10.2.3, Automatic updates 3.0.0 installed.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | automatic_updates-3424290.patch | 813 bytes | abhishek_gupta1 |
Issue fork automatic_updates-3424290
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
abhishek_gupta1 commentedComment #3
abhishek_gupta1 commented@rehm, fixed the issue created Patch . please review it.
Comment #4
tedbow@rehm did you install the module via Composer? Can provide your composer lock file? I wondering if there is some problem with your version of php-tuf/composer-stager for some reason.
@abhishek_gupta1 thanks for the patch but first we need to figure why there is boolean instead of string provide instead of just throwing an exception.
Comment #5
tedbowI wondering if the problem comes from
\Drupal\package_manager\PathExcluder\SiteFilesExcluder::excludeSiteFilesrealpath()could return a falseComment #6
tedbow@rehm this could be caused by your private or public file settings point to path that does not exist. These are usually set in setting.php . $settings['file_public_path'] or $settings['file_private_path'] you can check the current values at admin/config/media/file-system
I set
and it caused the same error you experienced.
@rehm can you check these paths and see if they point to real paths?
Comment #8
tedbowComment #9
tedbowComment #11
tedbowComment #12
phenaproximaOne request (we should use the file_system service's realpath() function), otherwise RTBC from me. We might want to also add an @see to the test, or maybe a more expansive comment, to explain what's going on.
Comment #13
tedbow@phenaproxima back to you
Comment #14
phenaproximaComment #15
phenaproximaLooks pretty good to me!
Comment #17
tedbow🎉