When a user creates a new split, if the configuration directory does not exist, add an option to create it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nerdstein created an issue. See original summary.

nerdstein’s picture

This was actually a usability issue for me and I thought this functionality was not working when it actually is.

The help text under the "folder" specified the use of the full path to the configuration target directory. If this directory does not exist, it does create it.

My impression was that the path was relative to the configuration directory and not a full path to the config.

Should there be consideration to adding a default value when creating a new configuration split? Alternatively, is there any way we could consider a directory relative to a base config directory that contains multiple target directories?

nerdstein’s picture

Status: Active » Needs review
FileSize
1.62 KB

Attached is a patch to consider that sets a sane default on the form for the folder field.

This assumes this patch from the other issue is first merged: https://www.drupal.org/node/2863849#comment-12005374

bircher’s picture

Title: Add option to create new config directory if specified directory does not exist » Add default value for split folder
Status: Needs review » Needs work

Putting the default to the parent of the sync directory is not a good idea in my opinion because it should be a directory in that one.
So rather than having a default that one needs to change I would rather not have a default.

I am not even sure we need a default at all. We could interpret an empty folder to mean saving it to the database, see #2865110: Allow split to live in the database

bircher’s picture

Status: Needs work » Closed (won't fix)

Now with empty folder being in the database I think we can close this.
We would need it again if we change the ui to be a checkbox