Problem/Motivation
When exporting configuration from /admin/config/development/configuration/full/export, the last file is missing from the tarball config.tar.gz, for example views.view.who_s_online.yml. It is not missing when the export is done using drush cex
How to recreate the issue:
step 1:
Fresh install of the latest Drupal version 8.0.x-dev.
Export and import archive via UI without extracting
step 2: Make sure staging directory is empty.
step 3: Grab export archive from /admin/config/development/configuration/full/export and save it somewhere.
step 4: Go to /admin/config/development/configuration/full/import and import archive
step 5: Check staging directory, notice views.view.who_s_online.yml is there!
step 6: Extract the archive somewhere (not in staging, you just wanna see the contents), look for views.view.who_s_online.yml. Result: it's not there!
Reproduce issue by modifying ConfigController.php
step 2:
Open core/modules/config/src/controller/ConfigController.php and modify the downloadExport function as follows:
$file_list = array(); // added this line for debugging purpose
foreach ($this->configManager->getConfigFactory()->listAll() as $name) {
$archiver->addString("$name.yml", Yaml::encode($this->configManager->getConfigFactory()->get($name)->getRawData()));
$file_list[] = "$name.yml"; // added this line for debugging purpose
}
step 3:
Do a full config export and compare the content of $file_list and your config.tar.gz file. The last file of $file_list is missing from tarball.
Reproduce issue using Drush
step 2: Preferably version control the staging directory so you can see changes better. Use drush cex to dump your config into staging directory. Check files, notice views.view.who_s_online.yml
step 3 :Delete all files from staging directory. Go to /admin/config/development/configuration/full/export, grab the archive, extract it to staging. Check files, notice that views.view.who_s_online.yml is there.
laszlo.kovacs devel config:
ubuntu 14.04
PHP Version 5.5.9-1ubuntu4.6
aschiwi devel config:
OS X Yosemite 10.0
PHP Version 5.4.34
Comments
Comment #1
aschiwi commentedQuick crosslink before I add to this issue's summary tomorrow: https://www.drupal.org/node/2438029
dawehner pointed me to this issue, pretty sure it's the same problem.
Comment #2
aschiwi commentedUpdated the issue summary. I added the simplest way to reproduce as the first one.
Comment #3
aschiwi commentedComment #4
laszlo.kovacs@aschiwi: I think the reason of your problem described here is digged in system.site.yml file where the uuid is different than your site's uuid. Read more about the problem and the solution (hook_install) here.
Comment #5
aschiwi commented@laszlo.kovacs No not at all, try the steps to reproduce. It's the same problem you described, I just added more information and ways to reproduce. I don't even have two sites.
Comment #6
swentel commentedTried reproducing, don't have the problem here.
Comment #7
aschiwi commentedThanks for testing. I tried with Beta7 and can't reproduce there either. Let's assume this fixed. Please reopen if this issue reappears. Changing the version to beta6 because that's where I had the issue.
Comment #8
laszlo.kovacsI am sorry to say but I have just downloaded Beta7 installed with standard profile then tried steps described in "Reproduce issue by modifying ConfigController.php". The error still exists. In $file_list I have 172 files among them views.view.who_s_online which is missing from tarball.
Comment #9
aschiwi commentedInteresting, so let's open this back up. All I did was export the tarball and it gave me views.view.who_s_online.yml.
Comment #10
laszlo.kovacsToday I downloaded and installed beta12 to see if anything happened with this issue. I am sad to say that the situation is still the same. As the project is getting closer and closer to the end this issue is getting more and more important too.
How to recreate the issue:
step 1: install drupal 8 with standard profile.
step 2: go to Configuration -> Configuration management -> Full import/export tab and then Export
(admin/config/development/configuration/full/export)
step 3: save the config.tar.gz file somewhere
step 4: extract the full content of config.tar.gz file into staging folder. By default it is in sites/default/files/config_some hash_/staging.
step 5: come back to Configuration -> Configuration management -> Synchronize tab. views.view.who_s_online file is shown as removed.
Comment #11
segi commentedHi,
I tested with beta-12 on my OSX and simplytest.me as well, I could reproduce the issue on both system.
Comment #14
quietone commented@laszlo.kovacs, thanks for reporting this problem and testing.
Tested on Drupal 8.9.x, using the steps in the first part of the IS and #40, and was not able to reproduce the issues.
If you are experiencing this problem reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").
Thanks!