Hello, 

Please i have a have a probleme with module content syncro , after i have installed it, this error was appeared

"The content directory type 'sync' does not exist"

I already have variable config_directories in seetings.php, and i attribute rules to this folder 777 

$config_directories = array();

$config_directories['sync'] = 'sites/sync';

Thank you in advance

Comments

mmjvb’s picture

When normal filesystem security doesn't appear to work most of the time SELinux is in effect. That means you need to do a little more to get what you want.

fatimadrupal8’s picture

Thank's for your reply, but i don't understand really what you mean 

mmjvb’s picture

SELinux is an addition to filesystem security. 

The message you receive contradicts the information you provided. So, with a 777 folder configured you shouldn't receive that message!

With SELinux in effect, normal file system security is overruled.

arnoldbird’s picture

https://www.drupal.org/project/content_sync/issues/2994675#comment-12897528

Don't you love it when an error message tells you a directory doesn't exist but doesn't tell you where it's supposed to exist?

mmjvb’s picture

Checked the message in the module. It actually says there is no $content_directories['sync'] set to a directory. OP probably forgot to use global $content_directories in settings.php.

So, nothing to do with directory in filesystem or security. Just not following instructions!

See the code:

function content_sync_get_content_directory($type) {
  global $content_directories;

  // @todo Remove fallback in Drupal 9. https://www.drupal.org/node/2574943
  /*if ($type == CONTENT_SYNC_DIRECTORY &&
      !isset($content_directories[CONTENT_SYNC_DIRECTORY])
      && isset($content_directories[CONTENT_STAGING_DIRECTORY])) {
    $type = CONTENT_STAGING_DIRECTORY;
  }*/
  if ($type == 'sync' &&
    !isset($content_directories['sync'])
    && isset($content_directories['staging'])) {
    $type = 'staging';
  }

  if (!empty($content_directories[$type])) {
    return $content_directories[$type];
  }
  // @todo https://www.drupal.org/node/2696103 Throw a more specific exception.
  //throw new \Exception("The content directory type '$type' does not exist");
  drupal_set_message(t("The content directory type '$type' does not exist"), 'error');
}
stuman’s picture

Am I missing something?

Actually, managed to back into it...