Set file_public_path relative to the Drupal root in local.settings.php #4222
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #
None.
Changes proposed
file_public_path is set wrong in local.settings.php. Drupal explicitly documents that it needs to be relative to the Drupal root, not an absolute path. My references are default.settings.php, and Drupal\system\Form\FileSystemForm. Both say this:
This was originally changed in 5a4aa87. Why, I don't know. But it is not correct, and breaks Drupal-level code. A concrete example is Cohesion -- it needs this value to be configured properly, or it cannot resolve the location of its CSS and JavaScript, thus breaking it in a big way, since it relies utterly on those assets in order to not only be usable by administrators, but also to display its output correctly.
Steps to replicate the issue
None needed. You'll see it when you create a BLT project.
Previous (bad) behavior, before applying PR
file_public_path will be a /full/path/to/site/directory/files. It needs to simply be site/directory/files.
Additional details