Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
configuration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Sep 2012 at 20:18 UTC
Updated:
29 Jul 2014 at 21:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
andreiashu commentedupdating title
Comment #2
andreiashu commentedComment #4
andreiashu commentedI think the test bot failed because of: c6bfd262e22778f3681118bd920bcebef7fc515f which was reverted recently.
Retest
Comment #5
andreiashu commented#2: 1799504_file_chmod_1.patch queued for re-testing.
Comment #7
andreiashu commentedok I was wrong. will look into why the installer fails a bit later
Comment #8
simeShould handle:
file_chmod_directory
file_chmod_file
file_default_scheme
In system.file.yml rather than system.site.yml
Comment #9
simeIssue now covers all these variables:
file_chmod_directory
file_chmod_file
file_default_scheme
file_public_path
file_private_path
file_temporary_path
Latest patch attached, but not complete. Todo:
-- convert file_*_path variables
-- update system_file_system_settings() to use system_config_form and provide a submit handler.
Comment #10
simeTODO:
1) Update
system_file_system_settings()to usesystem_config_form()and provide a submit handler.2) Some settings uses conf_path() to define the default. I do not know how to define this in the yml file. I am currently doing:
Comment #12
simeI was apparently unable to do "file mode" as a octal in the YAML file. So I used integers.
There are still errors in the installation.
Comment #13
simeConfiguration should set temporary file directory as NULL
Comment #15
simeFixed install hook conflict.
Comment #17
simeYay, got past the installer. Working on the system form.
Comment #18
simeI should probably take ownership of the issue to avoid confusion.
Comment #19
simeThe system settings form is done, not all tests are passing though.
Comment #20
simeMy local tests against an 8.x branch are giving me fails so going to see what the testbot says.
Comment #22
simeFixed up ->drupalGetTestFiles()
Comment #24
simeOK, 1 exception left. I do not know how to prevent it properly. It occurs in
MTimeProtectedFileStorageTest.phpin thetestSecurity()method.I do not know why
config('system.file')->get('path.public')is returning nothing when it is working fine in other tests. Also these PHPStorage tests are badly broken for me whereas the testbot shows only one exception.Looking at the code, the old code uses a variable get and doesn't care much if it needs to grab a default value comprised of
conf_path() . /files, so the new patch *might* be appropriate, and replaces the above line with:Comment #25
simeOtherwise, this is pretty close... unassigning myself, but will keep an eye on it.
Comment #27
simeLooks like #22 is the best effort so far.
Comment #28
andreiashu commentedPatch form #22 works fine for me and all PHPStorage tests are green so retesting
Comment #29
andreiashu commented#22: drupal-system_file_settings-1799504-22.patch queued for re-testing.
Comment #30
dave reidThis looks perfectly sane except for the removal of file_default_schema(), which could be changed to be a wrapper for config(), much like file_directory_temp(). Let's please revert those removals of file_default_schema() in the name of DX.
This should use file_default_scheme() instead.
This should just be using
return file_directory_temp()as a cleanup.Comment #31
andreiashu commentedThanks Simon, patch from #22 is now green. Can someone review and RTBC please?
Credits for the patch should go to Simon please
Comment #32
dave reidI guess from a security perspective, are the following comments preserved in the exported config files? Otherwise I could see people trying to manually change these values to '0775' and things not working as expected.
Comment #33
andreiashu commented@Dave: oops posted at the same time.
will amend
Comment #34
dave reidheyrocker confirms comments are not preserved, so based on #32 alone I need to mark this as needs work.
Comment #35
andreiashu commentedAttached patch a per Dave's suggestions in #30 and #34
Comment #36
andreiashu commentedoops. Ignore previous patch, I need to use file_default_scheme() in all places where we were using config directly...
new patch soon to come
Comment #37
dave reidA little confused why we can't actually use octal in YAML? http://trac.symfony-project.org/ticket/7067 seems it was fixed three years ago?
Comment #38
andreiashu commentedPatch rerolled and updated per Dave's review. If we get green tests I'll attach another one with the octal values
Comment #39
andreiashu commentedThis one is with octal in YAML file
Comment #41
andreiashu commentedpatch from #39 had the perms as strings in the config file.
Attached patch has proper octal values in config this time
Comment #43
andreiashu commentedrerolled
Comment #44
andyceo commented#43: drupal-system_file_settings-1799504-43.patch queued for re-testing.
Comment #46
andyceo commentedRe-roll of patch in #43 comment.
Comment #47
cameron tod commentedReroll for current head.
Comment #48
cameron tod commentedChanging octals back to strings after a discussion here at the London drop-in sprint.
Comment #50
cameron tod commented#48: 1799504-convert_system_file_related_variables_to_CMI-48.patch queued for re-testing.
Comment #52
ruth_delattre commentedComment #53
ruth_delattre commentedComment #54
pfrenssenWhen I apply this patch and try to install Drupal using the Standard profile through the interface I get the following error:
Comment #55
pfrenssenThis is unfortunately a duplicate of #1496480: Convert file system settings to the new configuration system :(
I'll propose in the original issue that commit credit is given to the people that worked on it here so that the hard work done is not entirely lost.
Comment #55.0
pfrenssenUpdated issue summary to include all variables.