Problem/Motivation

Title says it all. Both migration plugins do a migration lookup in d7_menu.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Status: Active » Needs review
StatusFileSize
new587 bytes
wim leers’s picture

StatusFileSize
new682 bytes

Rebased.

Status: Needs review » Needs work

The last submitted patch, 3: 3189476-3.patch, failed testing. View results

quietone’s picture

The dependencies will have to go into the optional since node_translation_menu_links.yml is used for D6 and D7

 migration_dependencies:
   optional:
+    - d6_menu
     - d6_menu_links
     - d6_node_translation
+    - d7_menu
     - d7_menu_links
     - d7_node_translation
ankithashetty’s picture

Status: Needs work » Needs review
StatusFileSize
new581 bytes
new557 bytes

Updated the patch in #3 as per changes suggested in #5. Thank you!

quietone’s picture

Status: Needs review » Needs work
Issue tags: +Novice

@ankithashetty, thank for the patch.

Now, with this change why are all tests still passing?

The migration node_translation_menu_links is found in d6/MigrateDrupal6AuditIdsTest.php and d7/MigrateDrupal7AuditIdsTest.php. These tests are checking for ID conflict and are not running the migration so no change is needed in these tests.

It is also found in two migration tests, d6/MigrateMenuLinkTest.php and d7/MigrateMenuLinkTest.php. Both of these run the respective menu migration, indicating that it is needed. Locally, I removed d6_menu and d7_menu and ran the tests. As expected, they failed, thus proving the dependency.

It is probably prudent to make a fail patch to prove this change is correct. So, the next step is to remove d6_menu and d7_menu from the respective migration tests, d6/MigrateMenuLinkTest.php and d7/MigrateMenuLinkTest.php. That will be the fail patch. And the success path is the patch from #6.

ayushmishra206’s picture

Assigned: Unassigned » ayushmishra206
ayushmishra206’s picture

Assigned: ayushmishra206 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.22 KB
new1.79 KB

Added the Failed patch as suggested in #7. Please review.

Status: Needs review » Needs work

The last submitted patch, 9: 3189476-9.patch, failed testing. View results

quietone’s picture

Status: Needs work » Needs review
StatusFileSize
new581 bytes

@ayushmishra206, thanks for that.

The tests do fail but they don't fail with an expected dependency error, instead it is

1) Drupal\Tests\menu_link_content\Kernel\Migrate\d7\MigrateMenuLinkTest::testMenuLinks
PHPUnit\Framework\Exception: PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in Standard input code:80

and this is due to #3192893: [META] Serialization issues in Migration tests. Applying that patch and running the tests locally result in the expected error

1) Drupal\Tests\menu_link_content\Kernel\Migrate\d6\MigrateMenuLinkTest::testMenuLinks
Migration d6_menu_links did not meet the requirements. Missing migrations d6_menu. requirements: d6_menu.

and

1) Drupal\Tests\menu_link_content\Kernel\Migrate\d7\MigrateMenuLinkTest::testMenuLinks
Migration d7_menu_links did not meet the requirements. Missing migrations d7_menu. requirements: d7_menu.

I hope that is sufficient evidence that the patch here works as expected.

The last thing to do is to upload the success patch so it is the one tested.

ayushmishra206’s picture

Kudos! @quietone

quietone’s picture

Status: Needs review » Reviewed & tested by the community

Tests for the latest patch are passing, so this can be RTBC.

alexpott’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 1d14620445 to 9.2.x and 307f586380 to 9.1.x. Thanks!

  • alexpott committed 1d14620 on 9.2.x
    Issue #3189476 by Wim Leers, ayushmishra206, ankithashetty, quietone: If...

  • alexpott committed 307f586 on 9.1.x
    Issue #3189476 by Wim Leers, ayushmishra206, ankithashetty, quietone: If...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.