During importInvokeOwner, we pass $old_config to importCreate(), which is just nuts. There is no $old_config, we're creating it from scratch.

During importInvokeOwner, we pass $new_config to importDelete(), which is just nuts. There is no $new_config, we're rm -rf'ing.

This patch fixes that and the existing call sites in core.

Files: 
CommentFileSizeAuthor
#9 6-9-interdiff.txt3.58 KBalexpott
#9 2089229-9.patch8.45 KBalexpott
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2089229-9.patch. Unable to apply patch. See the log in the details link for more information. View
#6 2089229-6-derp-derp.patch8.67 KBmtift
FAILED: [[SimpleTest]]: [MySQL] 59,793 pass(es), 3 fail(s), and 5 exception(s). View
#6 interdiff.txt1.53 KBmtift
#4 2089229-4-derp-derp.patch8.58 KBmtift
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed. View
#4 interdiff.txt1.64 KBmtift
#2 2089229-2-derp-derp.patch8.78 KBbeejeebus
PASSED: [[SimpleTest]]: [MySQL] 58,815 pass(es). View
fix-CMI-import-API.patch8.73 KBbeejeebus
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed. View

Comments

Status: Needs review » Needs work

The last submitted patch, fix-CMI-import-API.patch, failed testing.

beejeebus’s picture

Status: Needs work » Needs review
FileSize
8.78 KB
PASSED: [[SimpleTest]]: [MySQL] 58,815 pass(es). View

fix durp durp durpal in first patch.

mtift’s picture

Status: Needs review » Needs work
+++ b/core/lib/Drupal/Core/Config/ConfigImporter.php
@@ -306,6 +302,69 @@ protected function importInvokeOwner() {
+    if ($data !== FALSE) {
+      $new_config->setData($data);
+    }
...
+    if ($data !== FALSE) {
+      $config->setData($data);
+    }
...
+    if ($data !== FALSE) {
+      $config->setData($data);
+    }

Now that we're splitting these methods up we no longer need to check that $data is not FALSE

mtift’s picture

Status: Needs work » Needs review
FileSize
1.64 KB
8.58 KB
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed. View

And here's a patch

Status: Needs review » Needs work

The last submitted patch, 2089229-4-derp-derp.patch, failed testing.

mtift’s picture

FileSize
1.53 KB
8.67 KB
FAILED: [[SimpleTest]]: [MySQL] 59,793 pass(es), 3 fail(s), and 5 exception(s). View

Duh

mtift’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2089229-6-derp-derp.patch, failed testing.

alexpott’s picture

Status: Needs work » Needs review
FileSize
8.45 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2089229-9.patch. Unable to apply patch. See the log in the details link for more information. View
3.58 KB

Lets go the whole way and remove the senseless use of a config object when deleting a config entity through an import.

beejeebus’s picture

Status: Needs review » Reviewed & tested by the community

yay, green, i think this is RTBC.

Xano’s picture

9: 2089229-9.patch queued for re-testing.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 9: 2089229-9.patch, failed testing.

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

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

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