Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By gelierb on
Are there problems withe the 8.1.8 update? First time I've had any issues with a simple Drupal 8 update. And why does drupal.org continue to show 8.1.7 released on the home page with no update? Keep getting
"Not present
Your sites/default/settings.php file must define the $config_directories variable as an array containing the names of directories in which configuration files can be found. It must contain a sync key."
Been trying a bunch of stuff and can't seem to find what's going on. A little disconcerting.
Comments
/**
Is the above included in your settings.php file? If no, then you will need to make sure you replace the default.settings.php and settings.php file in your core.
VM - thanks for the comment..
VM - thanks for the comment...
=== $config_directories = array(); is indeed in the settings.php file. In fact nothing has been changed in that file now or during other updates.
I'm not sure what it all means of course -
=== the:
$settings['install_profile'] = 'standard';
$config_directories['active'] = 'sites/default/files/config_...;
$config_directories['staging'] = 'sites/default/files/config_...';
stuff that shows up at the bottom of the file.
=== the:
$settings['hash_salt'] = ... in the file.
=== why your comments talk about "CONFIG_SYNC_DIRECTORY":
* Example:
* @code
* $config_directories = array(
* CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot',
* );
* @endcode
=== mine talk about:
* Example:
* @code
* $config_directories = array(
* CONFIG_ACTIVE_DIRECTORY => '/some/directory/outside/webroot',
* CONFIG_STAGING_DIRECTORY => '/another/directory/outside/webroot',
* );
* @endcode
========= bottom line - why I have this status error:
"Not present
Your sites/default/settings.php file must define the $config_directories variable as an array containing the names of directories in which configuration files can be found. It must contain a sync key."
when as far as I can tell - nothing has changed from before :(
O - so now the download page
OK - so now the download page for 8.1.8 has been updated and says:
"#2466197: Staging directory should not have to be writeable. was missing logic to create the sync directory.... The solution is to either use the 8.1.x-dev release, or upgrade to the next patch release (e.g. 8.1.9 or 8.2.0-beta2)."
If the "solution" is to wait and upgrade to a later patch, why is this patch even still available? Guess I just don't get the big picture here.
Same Problem
Any update on this? I'm running 8.19 and I'm still getting the same missing config directories error.
I had the same
I removed the settings.php file, copy the default.settings.php file (from the drupal 8.18) to the /sites/default directory and changed it to settings.php
I filled the details with the existing database name, username & password and it's gone.
(It's not re-install your database, it uses the existing one).
Solution in 8.2.4 and may work in other versions
Paste below line in sites/default/settings.php file's line 247
$config_directories = array(CONFIG_SYNC_DIRECTORY => 'webroot',);
This Worked for me in drupal 8.2.4 You can try it might work for you
webroot
now this shows up "The directory webroot does not exist".
Setting should be ...
$config_directories['sync'] = 'sites/default/files/config_jCRVU4W927AjY7e5FIaf_W9RT_Qgftm3KE6BGvQQCaRMt9uQwenJanjSkWXCbBD-KkyjafG0AA/sync';
Obviously, between config and /sync depends on your environment.
Solved
I solved the problem. Thanks for your help
Can you let us know how you
Can you let us know how you solved the problem? Thanks!
solved
My site is on local. I just find this folder 'config_acqTmp-2017-02-09T19.04.11-8467' in my 'sites\default\files' and i just copied in 247 line in settings.php file and save it. So in your case this folder 'config_acqTmp-2017-02-09T19.04.11-8467' will look a little bit different.
$config_directories['sync'] = 'sites\default\files\config_acqTmp-2017-02-09T19.04.11-8467'; - this is the line that i copied on 247 line in settings.php.
$config_directories['sync'] = 'sites\default\files\your config folder goes here'; - try this and let me know.
worked for me
This solution worked for me.
In order to find that config_gobblygook, I looked in docroot/sites/default/files and in there is a folder named config_ and then a whole bunch of letters and numbers. I copied that full name and then inserted it into line 247 of the settings.php file.
I'm using Drupal 8.2.3
Stuck
Hi, I'm new to D8 and trying to resolve this problem but not quite understanding the fix.
Exactly how are you supposed to insert/paste the 'config_acqTmp-20...' text (mentioned in above posts) into line 247?
Line 247 falls inside these lines of code in the settings.php file:
* Example:
* @code
* $config_directories = array(
* CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot',
* );
* @endcode
I've been messing with it, trying various ways, but can't get it to work. I fixed the Trusted Host Settings error...this one eludes me.
Can someone please copy the 'code' above and show me what it would look like with the fix inserted?
Line # is irrelevant
Again, name of folder config_ needs to be looked up in your environment!
OK, but...
Thanks for chiming in, mmjvb!
Should it look like this (but with my full folder config_):
* Example:
* @code
* $config_directories['sync'] = 'sites/default/files/
* config_acqTmp-2017/sync';
* @endcode
or like this:
* Example:
* @code
* $config_directories['sync'] = 'sites/default/files/config_acqTmp-2017/sync';
* @endcode
Because either way, it still isn't working for me.
Am I missing something here? Do I need to do something else to get this error cleared up?
BTW, what is the # line you're referring to?
No, both are wrong!
Both examples you gave show comments. Don't change the comments. Anything between /* and */ is a comment.
It should look like I showed you. And again, it doesn't matter where you put the line.
Just as an example the last lines of my settings.php:
Ok
Ok, thanks for clarifying that. Learning all the time!
I did as you've directed but it is still throwing up an error. It has changed the error message though. Now it says the directory: sites/default/files/config_acqTmp-2017/sync does not exist. I double checked the (full) config file title and it's correct.
Any idea why it would say it doesn't exist?
Wrong name or wrong security
Either the name is wrong, think about case sensitivity or where is the rest of the date. Or there is something wrong with security settings of one of the folders in the path. Check the full path and verify whether apache has access to each folder.
Synced
Ok, I finally figured it out. There was no 'sync' folder in the 'config_acqTmp-2017' folder!
As soon as I added the sync folder the error disappeared, and I'm good to go.
Thanks for your help, patience and time in responding to me on this issue.
You are welcome
Glad you found it in the end (pun intended, ;) ).
Thanks
This whole thread helped me in resolving the issue
This helped.. even though
This helped.. even though inside my config_...... folder there was no sync folder. I made one and the errors were gone. Thanks
FIXED!
Thank you, mmjvb:
$config_directories['sync'] = 'sites/default/files/config_jCRVU4W927AjY7e5FIaf_W9RT_Qgftm3KE6BGvQQCaRMt9uQwenJanjSkWXCbBD-KkyjafG0AA/sync';
Copied the code above and replace the "config_..." file name with the name that was generated and PROBLEM SOLVED! Thank you!
Local end-users solution in detailed steps
FYI:
Baby step easy solution for end-users running
Drupal 8 locally on your computer,
in my case,
on Windows with Acquia Dev Desktop
ERROR:
Solution:
[Solved] Drupal 8 Acquia error - Your sites/*/.dd/settings.php file must define the $config_directories ... contain a sync key
https://www.drupal.org/node/2891394
All the best; intended.
-Chris (great-grandpa.com)
___
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *
I always had strange
I always had strange anomalies with Drupal 8 on DevDesktop. I can't remember what was wrong. I switched to XAMPP and it was smooth sailing ever since. (This might give folks another option if they have errors and don't know where to turn.