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

aschiwi’s picture

Quick 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.

aschiwi’s picture

Title: Last file missing from tarball after config full export » Last file missing from extracted tarball after config full export
Issue summary: View changes

Updated the issue summary. I added the simplest way to reproduce as the first one.

aschiwi’s picture

Issue summary: View changes
laszlo.kovacs’s picture

@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.

aschiwi’s picture

@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.

swentel’s picture

Tried reproducing, don't have the problem here.

aschiwi’s picture

Version: 8.0.x-dev » 8.0.0-beta6
Status: Active » Closed (cannot reproduce)

Thanks 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.

laszlo.kovacs’s picture

I 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.

aschiwi’s picture

Status: Closed (cannot reproduce) » Active

Interesting, so let's open this back up. All I did was export the tarball and it gave me views.view.who_s_online.yml.

laszlo.kovacs’s picture

Today 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.

segi’s picture

Hi,

I tested with beta-12 on my OSX and simplytest.me as well, I could reproduce the issue on both system.

Version: 8.0.0-beta6 » 8.0.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.0.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Status: Active » Closed (cannot reproduce)
Issue tags: +Bug Smash Initiative

@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!