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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

colan created an issue. See original summary.

colan’s picture

Assigned: colan » Unassigned
Status: Active » Needs review
FileSize
2.76 KB

See attached.

memtkmcc’s picture

What 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.

memtkmcc’s picture

Status: Needs review » Needs work
colan’s picture

Right. Maybe we should rework that whole section then. One control structure for 8 and 7, dropping the 6- stuff?

memtkmcc’s picture

I 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)

colan’s picture

Okay, 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.

helmo’s picture

+1 for cleaning this up... if file_directory_temp_var is static per drupal version we can just add it to the template directly.

memtkmcc’s picture

Status: Needs work » Needs review
FileSize
8.6 KB

Proposed cleanup and update attached for review.

helmo’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, and Travis was happy with it... https://github.com/aegir-project/provision/pull/8

  • helmo committed fa08565 on 7.x-3.x
    Issue #2819021 by colan, memtkmcc: Template cleanup
    
helmo’s picture

Status: Reviewed & tested by the community » Fixed

merged

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.