Line 332 in color.module does
$paths['color'] = 'public://color';

However, Drupal allows me to only enter a private file path in my file system settings, and leaving the public files directory empty. Drupal works fine, until I try to change the colors of my theme. Then Drupal generates some bugs as

The file permissions could not be set on public://color.


File temporary://fileCUgZxH could not be copied, because the destination directory is not configured correctly.

Is it possible to use the private file system, if the user prefers that? Of if not, just check if the public file directory is set?

#7 color-with-default-public-stream.png138.22 KB-enzo-
#6 drupal-1106160-6.patch642 bytesBarisW
PASSED: [[SimpleTest]]: [MySQL] 57,603 pass(es).
[ View ]
#3 drupal-1106160-3.patch622 bytestim.plunkett
PASSED: [[SimpleTest]]: [MySQL] 32,931 pass(es).
[ View ]



On a side note, I discovered this while fixing a bug in my Google Fonts module (#1103884: system/files/google_fonts/google_fonts.css page not found). It seems that /system/files/name_of_my_css_file.css resolves in a 404, so maybe that's why the color module hardcoded public:// in it?

Version:7.x-dev» 8.x-dev
Status:Active» Needs review
Issue tags:+needs backport to D7
new622 bytes
PASSED: [[SimpleTest]]: [MySQL] 32,931 pass(es).
[ View ]

Is this all that is needed? Using file_default_scheme() instead?

Status:Needs review» Needs work

Patch from #3 failed for me in both 8.x and 7.x installations. Steps to reproduce:

  1. Install standard installation profile
  2. Apply patch - patch -p1 < ~/tmp/drupal-1106160-3.patch
  3. In admin menu, choose 'Configuration' > 'Media' > 'File system'
  4. Clear value from the Public file system path field
  5. Put 'sites/default/files' in the Private file system path field
  6. Press Save
  7. Choose Private local files served by Drupal as default download method
  8. Press Save
  9. In admin menu, choose 'Appearance' > 'Bartik' > 'Settings'
  10. Choose any color set except default and press save
  11. Several warnings appear:
    Warning: file_put_contents(public:///.htaccess): failed to open stream: "DrupalPublicStreamWrapper::stream_open" call failed in file_save_htaccess() (line 505 of /home/valeryl/work/d8/includes/
        Warning: file_put_contents(public:///.htaccess): failed to open stream: "DrupalPublicStreamWrapper::stream_open" call failed in file_save_htaccess() (line 505 of /home/valeryl/work/d8  /includes/
  12. Go to the front page - CSS is broken
  13. Steps 2-12 repeated for both d8.loc and d7.loc, with the same result

Once a new patch has been re-rolled, we should probably test against (which should help clarify if this is a server/local file permissions issue or an actual bug in the code).

Status:Needs work» Needs review
new642 bytes
PASSED: [[SimpleTest]]: [MySQL] 57,603 pass(es).
[ View ]

Here's a re-roll.

Status:Needs review» Reviewed & tested by the community
new138.22 KB

I tested the patch #1106160-6: Color module uses the public file system but doesn't check if it is set successfully as you can see in the following image.


To test this change you must change the settings for any theme like Bartik in URL and any change create a new folder in public stream folder color.

If you want to review the public stream, you need to go to URL, as you can read in instructions if you want to change the public stream you must to change in setting.php as you can see in the following code.

* Public file path:
* A local file system path where public files will be stored. This directory
* must exist and be writable by Drupal. This directory must be relative to
* the Drupal installation directory and be accessible over the web.
# $settings['file_public_path'] = 'sites/default/files';

Looks good to me, RTBC.

Status:Reviewed & tested by the community» Fixed

Committed cef318b and pushed to 8.x. Thanks!

Version:8.x-dev» 7.x-dev
Status:Fixed» Patch (to be ported)

And now for D7