Problem/Motivation

Once the multilingual migration path is fully stable (#2208401: [META] Remaining multilingual migration paths), we have no need for the separate Migrate Drupal Multilingual module.

Proposed resolution

Hide the module from the UI, disable it and let migrate discover multilingual migrations normally.

Remaining tasks

User interface changes

No more Migrate Drupal Multilingual module visible.

API changes

None. We keep the module for backwards compatibility.

Data model changes

Release note

The experimental Multingual Drupal Migrate module is no longer required to run multilingual migrations, which have the same stability level as other core migrations now.

CommentFileSizeAuthor
#73 diff-2966856.69-73.txt1.03 KBmikelutz
#73 2966856-73-8.9.drupal.patch42.71 KBmikelutz
#69 2966856-69-drupal9.patch42.79 KBGábor Hojtsy
#69 interdiff.txt385 bytesGábor Hojtsy
#63 interdiff.txt3.14 KBGábor Hojtsy
#63 2966856-63-drupal9.patch42.78 KBGábor Hojtsy
#60 interdiff.txt615 bytesGábor Hojtsy
#60 2966856-60-drupal9.patch42.72 KBGábor Hojtsy
#58 2966856-58-drupal9.patch42.7 KBGábor Hojtsy
#58 interdiff.txt826 bytesGábor Hojtsy
#56 2966856-56-drupal9.patch42.7 KBGábor Hojtsy
#51 2966856-51.patch42.89 KBvuil
#49 2966856-39.patch41.26 KBGábor Hojtsy
#39 2966856-39.patch41.26 KBalexpott
#39 37-39-interdiff.txt560 bytesalexpott
#37 2966856-37.patch41.26 KBalexpott
#37 29-37-interdiff.txt16.06 KBalexpott
#29 2966856-29.patch28.29 KBquietone
#29 interdiff-23.29.txt667 bytesquietone
#25 interdiff-14-23.txt582 bytesquietone
#25 2966856-23.patch27.45 KBquietone
#14 interdiff-7-14.txt1.26 KBquietone
#14 2966856-14.patch27.45 KBquietone
#7 2966856-7.patch25.84 KBquietone
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

heddn created an issue. See original summary.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Gábor Hojtsy’s picture

Gábor Hojtsy’s picture

Title: Follow-up: hide/disable migrate_drupal_i18n » [PP-1] Hide and disable Drupal Migrate Multilingual
quietone’s picture

Issue tags: +i18n-migrate

How does one hide a module from the UI and disable it ?

quietone’s picture

Status: Postponed » Needs review
FileSize
25.84 KB

I know this is postponed but wanted to make a start. Still need to modify the functional tests

Status: Needs review » Needs work

The last submitted patch, 7: 2966856-7.patch, failed testing. View results

quietone’s picture

Status: Needs work » Postponed

Those failures are expected.

quietone’s picture

This is going to take more work that I originally thought. When the multilingual migrations are discovered there will be failures when the i18n_something module is not enabled and that needs to be dealt with.

quietone’s picture

Issue summary: View changes

While this needs to be committed after #2208401: [META] Remaining multilingual migration paths work on this can happen now. There is more to do here that I thought last month so might as well start to make some progress.

quietone’s picture

Status: Postponed » Needs work
quietone’s picture

Title: [PP-1] Hide and disable Drupal Migrate Multilingual » Hide and disable Drupal Migrate Multilingual
quietone’s picture

Status: Needs work » Needs review
FileSize
27.45 KB
1.26 KB

Fix the failing functional tests.

quietone’s picture

I think the next step here is to create d6 and d7 db versions with out the i18n and/or entity translation enabled and run the full migration tests on those. Those db versions should be made through the UI so that all the tables and columns that are added to core tables are removed.

quietone’s picture

Regarding my comment above, that work should be done in a separate issue and can can be done now. There is no reason we can't be testing with non-multilingual databases. Another followup could be to discuss if the multilingual migration in config_translation and content_translation should or should not be moved to the module responsible for the entity being saved.

The latest patch here does in fact hide and disable migrate_drupal_multilingual and is ready to review.

voleger’s picture

Status: Needs review » Needs work
+++ b/core/modules/migrate_drupal/migrate_drupal.install
@@ -31,3 +31,10 @@ function migrate_drupal_update_8502() {
+function migrate_drupal_update_8602() {

8602 -> 8802

There have to be reflected in the actual minor version when this update_N hook implementation was defined.

Gábor Hojtsy’s picture

Agree with @volger in #17. Otherwise the patch looks fine. The pageTextNotContains() assertions look a bit odd given we never add that error anymore, but given the history of this feature, it is fine to keep them like that IMHO. Other than @voleger in #17 this is postponed on #2208401: [META] Remaining multilingual migration paths for actual commit though.

Gábor Hojtsy’s picture

Issue summary: View changes

A followup to remove the module in Drupal 9 would actually be needed. Added it to tasks in the issue summary.

catch’s picture

As well as uninstalling the module and marking it hidden, we should probably also add a hook_requirements() to the module that prevents it being installed with message. This would prevent it getting reinstalled via a configuration import or drush or similar after the update has run.

catch’s picture

Arghh one other thing I just thought of.

In the follow-up to remove the module from Drupal 9, we also need to remove the update function added here from Drupal 9 - because it will fail on Drupal 9 sites without a module to remove in the codebase.

This may be handled by #2942096: [policy, no patch] Remove old update hooks prior to each major version (Drupal 10 and later) but it may also need to be covered separately if it doesn't get done there.

xjm’s picture

Do we actually need to force uninstallation in a minor?

xjm’s picture

Also, what if someone updates directly from 8.7 to 9.0? (re: the update hooks etc.)

heddn’s picture

Wasn't there some recent discussion that we would semi require updating from 8.8 or 8.9 to 9.x? That anything more direct wouldn't be a supported upgrade path. Was there an issue for that or was it slack chatter? I can't recall.

quietone’s picture

Status: Needs work » Needs review
Related issues: +#3080244: Remove Drupal Migrate Multilingual
FileSize
27.45 KB
582 bytes

Just doing these two now.
#17. Fixed
#19. Followup to remove migrate_drupal_multilingual #3080244: Remove Drupal Migrate Multilingual

voleger’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, changes addressed for #17.
+1 for rtbc

quietone’s picture

@voleger, your welcome.

Oops, there is already an issue to Remove Migrate Drupal Multilingual in D9. #2966859: Remove Migrate Drupal Multilingual module in Drupal 10

quietone’s picture

Issue tags: -Needs change record

Change record added, please review. Thanks.

quietone’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs review
FileSize
667 bytes
28.29 KB

#20. Added a hook_requirements(). Note that this does not prevent the module from being installed with Drush because of https://github.com/drush-ops/drush/issues/3669. This is my first hook_requirements (I think) and I kept wondering what was wrong until I did some searching and gound that issue.

Still to do is answering the questions in #22 and #23.

Status: Needs review » Needs work

The last submitted patch, 29: 2966856-29.patch, failed testing. View results

Gábor Hojtsy’s picture

@xjm, @heddn: re updating from 8.7 to 9.0, see #2942096: [policy, no patch] Remove old update hooks prior to each major version (Drupal 10 and later) that catch linked above :)

quietone’s picture

I don't know how to fix the test failures, will someone provide some guidance please.

Gábor Hojtsy’s picture

If it is a legitimate fail, then it could be if hook_requirements() are checked before update functions are run and the fixture for testing update functions has the multilingual migrate module enabled?

Gábor Hojtsy’s picture

That may indeed be the case based on UpdatePathTestBase::runUpdates(). It does seem to check for minimal requirements errors, but attempts to swing forward if there were other errors. I don't know why is it not failing sooner on the continue link not being clickable, etc. but that is where it appears to be broken.

I don't have more time to track this down unfortunately :/

quietone’s picture

@Gábor Hojtsy. thanks very much. That says to me that I am not the best person to work on fixing those errors. I see if the project can have alexpott take a look.

alexpott’s picture

  1. +++ b/core/modules/migrate_drupal_multilingual/migrate_drupal_multilingual.install
    @@ -0,0 +1,19 @@
    +  $requirements = [];
    +  $requirements['migrate_drupal_multilingual'] = [
    +    'title' => t('Migrate Drupal Multilingual'),
    +    'severity' => REQUIREMENT_ERROR,
    +    'description' => t('The Migrate Drupal Multilingual is deprecated and should not be installed.'),
    +  ];
    +  return $requirements;
    

    I think this should only be checked at runtime and not during install - which might be automated - or update which we want to proceed for security reasons.

  2. +++ b/core/modules/migrate_drupal/migrate_drupal.install
    @@ -31,3 +31,10 @@ function migrate_drupal_update_8502() {
    +/**
    + * Uninstall migrate_drupal_multilingual since migrate_drupal is installed.
    + */
    +function migrate_drupal_update_8802() {
    +  \Drupal::service('module_installer')->uninstall(['migrate_drupal_multilingual']);
    +}
    

    We need to test this.

  3. +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NoMultilingualTest.php
    @@ -203,7 +203,7 @@ public function testMigrateUpgradeExecute() {
    -    $session->pageTextContains("Install migrate_drupal_multilingual to run migration 'd6_system_maintenance_translation'.");
    +    $session->pageTextNotContains("Install migrate_drupal_multilingual to run migration 'd6_system_maintenance_translation'.");
    
    +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/NoMultilingualTest.php
    @@ -214,7 +214,7 @@ public function testMigrateUpgradeExecute() {
    -    $session->pageTextContains("Install migrate_drupal_multilingual to run migration 'd7_system_maintenance_translation'.");
    +    $session->pageTextNotContains("Install migrate_drupal_multilingual to run migration 'd7_system_maintenance_translation'.");
    

    I think this should be change to assert that the expected migration is there and that $session->pageTextNotContains("Install migrate_drupal_multilingual"). Looking at this some more I think actually we should remove these tests as they are meaningless no that

alexpott’s picture

Status: Needs work » Needs review
FileSize
16.06 KB
41.26 KB

Here's a patch that addresses #36. I think we might want to add a test for the requirements error in the migrate_drupal_multilingual module.

The thing that needs discussion I think is the removal of

 delete mode 100644 core/modules/migrate_drupal_ui/tests/src/Functional/d6/NoMultilingualTest.php
 delete mode 100644 core/modules/migrate_drupal_ui/tests/src/Functional/d7/NoMultilingualTest.php

I think this makes sense as with this patch the tests don't seem to be really testing anything.

Status: Needs review » Needs work

The last submitted patch, 37: 2966856-37.patch, failed testing. View results

alexpott’s picture

Status: Needs work » Needs review
FileSize
560 bytes
41.26 KB
Gábor Hojtsy’s picture

Hah, the pageTextNotContains() assertions I also found odd as per #18, looking at their tests, it does seem like that is not testing anything particular anymore indeed.

Also agreed to put the requirements check at runtime only. If it blocks (security) updates that is a problem as then the update would not even run to disable it if we force to not run updates if it is enabled :D

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

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

clemens.tolboom’s picture

Issue summary: View changes

Fixed >/li> typo

quietone’s picture

Status: Needs review » Postponed
Gábor Hojtsy’s picture

Tagging.

xjm’s picture

Issue tags: +beta target
catch’s picture

#2746541: Migrate D6 and D7 node revision translations to D8 is as far as I know the last remaining core migration to land.

#3076447: Migrate D7 entity translation revision translations is for the entity_translation contributed module in 7.x.

Do we want to mark this stable when the core migration lands, then add the contrib migration to the stable module later, or wait for both?

heddn’s picture

The whole rational for forking off the separate multi lingual migrate module in core was because we knew it would take a lot longer to stabilize those upgrade paths for drupal. (I don't think anyone expected it to take quite so much time though). The hardest thing we've found is that there isn't quite enough folks with the knowledge and ability to test and provide feedback on these complicated issues.

With that short back story, I'd be more in favor of marking things stable in the multi lingual landscape sooner rather than later. Let's unleash migrations on more people. The only thing that gives me some pause is whether there are any potential BC concerns with doing the contrib stuff at a later date. And I'd say that the risk is pretty low at this point. We don't have to have every. single. migration. figured. out. Just the the main important ones and feel comfortable that we won't break things for folks in the future.

+1 on marking stable after #2746541: Migrate D6 and D7 node revision translations to D8

catch’s picture

Priority: Normal » Critical
Status: Postponed » Active

OK given #2746541: Migrate D6 and D7 node revision translations to D8 is RTBC, unpostponing this one.

Gábor Hojtsy’s picture

Status: Active » Needs review
FileSize
41.26 KB

Here is 39 again for sake of a rerun. Keeping 39 as-is so its green run is not hidden behind whatever comes out now :)

heddn’s picture

Looks like there are still outstanding questions about #22/#23.

Why don't we just leave it enabled, and deprecate it in 9.x for removal in 10.x? Less risky.

vuil’s picture

catch’s picture

We need to force uninstall in 9.0.x, so that the module can be removed from the file system in 10.x. Otherwise we'd be requiring people to manually install it prior to 10.x update, or they'll get 'missing module' errors.

The force-uninstallation doesn't need to go into the 8.9.x backport though, we can just hide it there.

heddn’s picture

I _think_ that's what I was trying to say. But #52 says it better. +1.

heddn’s picture

Status: Needs review » Needs work

NW because doesn't apply on 9.x. And note that D9 requires 7.3 at this point, so no need to stage tests on earlier version of PHP.

catch’s picture

#2746541: Migrate D6 and D7 node revision translations to D8 landed, so this is properly unblocked now.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
42.7 KB

Rerolled #51 for Drupal 9 specifically. The removed update function made it not apply.

Status: Needs review » Needs work

The last submitted patch, 56: 2966856-56-drupal9.patch, failed testing. View results

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
826 bytes
42.7 KB

drupal-8.filled.standard.php.gz is not present anymore, but drupal-8.8.0.filled.standard.php.gz is, let's see what does that get us.

catch’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockContentTranslationTest.php
    @@ -27,8 +27,6 @@ class MigrateBlockContentTranslationTest extends MigrateDrupal6TestBase {
         'statistics',
         'taxonomy',
    -    // Required for translation migrations.
    -    'migrate_drupal_multilingual',
       ];
    

    Exciting.

  2. +++ b/core/modules/migrate_drupal/migrate_drupal.install
    @@ -14,6 +14,13 @@ function migrate_drupal_update_last_removed() {
     
    +/**
    + * Uninstall migrate_drupal_multilingual since migrate_drupal is installed.
    + */
    +function migrate_drupal_update_8802() {
    +  \Drupal::service('module_installer')->uninstall(['migrate_drupal_multilingual']);
    +}
    +
    

    This can be a post-update (and should be, makes backports a lot simpler).

Apart from switching the hook_update_N() to a post-update, looks great to me - but needs work for that.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
42.72 KB
615 bytes

Made it a post-update.

catch’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/migrate_drupal/migrate_drupal.install
    @@ -17,7 +17,7 @@ function migrate_drupal_update_last_removed() {
      */
    -function migrate_drupal_update_8802() {
    +function migrate_drupal_post_update_uninstall_multilingual() {
       \Drupal::service('module_installer')->uninstall(['migrate_drupal_multilingual']);
     }
    

    Needs to move to migrate_drupal.post_update.php

  2. +++ b/core/modules/migrate_drupal/tests/src/Functional/MigrateDrupalUpdateTest.php
    @@ -0,0 +1,38 @@
    +   */
    

    @see reference should change.

  3. +++ b/core/modules/migrate_drupal_multilingual/migrate_drupal_multilingual.install
    @@ -0,0 +1,23 @@
    + *
    + * @see migrate_drupal_update_8802()
    + */
    

    @see reference should change.

Gábor Hojtsy’s picture

Assigned: Unassigned » Gábor Hojtsy
Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
42.78 KB
3.14 KB

Done :) I also noticed a small grammar problem in the requirements message.

@catch: I picked updates-8.9.x in the @addtogroup following prior groups for post_update hooks (although there is none currently in Drupal 9, this would be committed to Drupal 9 too I assume?). Or should this be backported all the way back to 8.8 in which case that would be the group?

heddn’s picture

Couple questions to add to the mix.

  1. +++ b/core/modules/migrate_drupal/migrate_drupal.post_update.php
    @@ -0,0 +1,20 @@
    + * @addtogroup updates-8.9.x
    + * @{
    + */
    +
    +/**
    + * Uninstall migrate_drupal_multilingual since migrate_drupal is installed.
    + */
    +function migrate_drupal_post_update_uninstall_multilingual() {
    

    We backported the final stable blocker to 8.8. So I don't see why we couldn't also add this to 8.8. But then again, there's no harm in waiting until 8.9 either.

  2. +++ b/core/modules/migrate_drupal_multilingual/migrate_drupal_multilingual.install
    @@ -0,0 +1,23 @@
    + * Implements hook_requirements().
    + *
    + * @see migrate_drupal_post_update_uninstall_multilingual()
    + */
    +function migrate_drupal_multilingual_requirements($phase) {
    

    Is this the only way to mark something deprecated? Is there any way to also trigger error so it would get caught by phpstan?

The last submitted patch, 60: 2966856-60-drupal9.patch, failed testing. View results

Gábor Hojtsy’s picture

@heddn: yeah I would refer to @catch on whether deprecating a whole module in Drupal 8.8 bugfix releases is acceptable. My hunch is not.

Re: the requirements message / how to deprecate, I don't think we can catch people depending on this module in their info file or anything like that. That said, @catch should also be able to verify that :)

Status: Needs review » Needs work

The last submitted patch, 63: 2966856-63-drupal9.patch, failed testing. View results

catch’s picture

We may need the module to minimise disruption for the 8.8 backport of #2746541: Migrate D6 and D7 node revision translations to D8, should not aim to deprecate/uninstall in 8.8 for that reason, but yeah also in general because it's a patch release.

@catch: I picked updates-8.9.x in the @addtogroup following prior groups for post_update hooks

No strong opinion but I think this is fine, to be honest we probably need to revisit that in general but not something to look at here.

Gábor Hojtsy’s picture

Status: Needs work » Needs review
FileSize
385 bytes
42.79 KB

Helps to include PHP tags in a PHP file :D

heddn’s picture

Status: Needs review » Reviewed & tested by the community

All my feedback addressed. Almost 2 years since opening, we get to mark this sucker closed. Nice feeling.

  • catch committed c964d76 on 9.0.x
    Issue #2966856 by Gábor Hojtsy, quietone, alexpott, vuil, catch, heddn:...
catch’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Patch (to be ported)
Issue tags: -Needs release note

Committed c964d76 and pushed to 9.0.x. Thanks!

The patch doesn't cherry-pick to 8.9.x so it'll need a re-roll.

@xjm asked whether we need to force uninstall in 8.9.x

#2966856-22: Hide and disable Drupal Migrate Multilingual

Since the module doesn't provide any functionality at all - it's effectively a configuration option, I think it is good to uninstall and hide it in this case in 8.9.x too. Different if it was an experimental module that provided anything else.

Added a release note.

mikelutz’s picture

Here's a straight up re-roll, not sure if we will need to adjust more tests in 8.9 that were removed from 9.0 already.

Gábor Hojtsy’s picture

Copy edited the change record and made it much clearer. Did not publish yet until it gets merged to 8.9.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Reroll looks good the post update file is different but because 8.9 already has a post update.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed d201e98 and pushed to 8.9.x. Thanks!

  • alexpott committed d201e98 on 8.9.x
    Issue #2966856 by Gábor Hojtsy, quietone, alexpott, mikelutz, vuil,...
xjm’s picture

This should probably be briefly explained in the release notes.

Status: Fixed » Closed (fixed)

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

quietone’s picture

Published change record.

Wim Leers’s picture

Issue tags: -Needs release note

Release note is already present.