After a Drupal 8 site installation, the following setting attempts to configure the location of the temporary files directory:
$settings['file_temporary_path'] = 'sites/www.example.com/private/temp';
However, I doubt that this is having much effect as that's no longer the correct configurable in Drupal 8. See #2662646: Add the temporary files directory config to the example config overrides in default.settings.php for details, and please add your vote to that issue if you agree that this should be provided as an example and/or documented in one of the shipped settings files.
The correct way to do this would be (I believe):
$config['system.file']['path']['temporary'] = DRUPAL_ROOT . 'sites/www.example.com/private/temp';
I should have a patch ready shortly.
Comment | File | Size | Author |
---|---|---|---|
#9 | 0001-Settings-8-7-6-core-templates-cleanup-and-update.patch | 8.6 KB | memtkmcc |
#2 | provision-temporary_file_directory_variable_d8-2819021-2.patch | 2.76 KB | colan |
Comments
Comment #2
colanSee attached.
Comment #3
memtkmcc CreditAttribution: memtkmcc at Omega8.cc commentedWhat a mess with inconsistent config/settings arrays in D8..
There are issues with this patch, though:
1. This line is broken:
$this->data['file_directory_temp_var'] = "system.file']['path']['temporary";
2. D8 specific stuff shouldn't be added within
if (drush_drupal_major_version() >= 7) {}
While I understand that it is a shortcut to avoid code duplication, and you are moving D7 specific line to
elseif (drush_drupal_major_version() == 7) {}
further below, so D8 specific line is overridden for D7, it feels confusing, and should be avoided, IMHO.Comment #4
memtkmcc CreditAttribution: memtkmcc at Omega8.cc commentedComment #5
colanRight. Maybe we should rework that whole section then. One control structure for 8 and 7, dropping the 6- stuff?
Comment #6
memtkmcc CreditAttribution: memtkmcc at Omega8.cc commentedI don't think we should drop D6 stuff, at least as long as D6 LTS support exists and Pressflow can run on supported PHP version (5.6)
Comment #7
colanOkay, so how about a single switch statement for 6, 7, and 8?
That "broken" line should actually work, given how the template looks now, but let's modify the template line so this looks less wacky.
Comment #8
helmo CreditAttribution: helmo as a volunteer and at Initfour websolutions for Aegir Cooperative commented+1 for cleaning this up... if file_directory_temp_var is static per drupal version we can just add it to the template directly.
Comment #9
memtkmcc CreditAttribution: memtkmcc at Omega8.cc commentedProposed cleanup and update attached for review.
Comment #10
helmo CreditAttribution: helmo as a volunteer and at Initfour websolutions for Aegir Cooperative commentedLooks good, and Travis was happy with it... https://github.com/aegir-project/provision/pull/8
Comment #12
helmo CreditAttribution: helmo as a volunteer and at Initfour websolutions for Aegir Cooperative commentedmerged