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
StatusFileSize
new8.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
StatusFileSize
new1.64 KB
new8.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

StatusFileSize
new1.53 KB
new8.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
StatusFileSize
new8.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 ]
new3.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.