On a site that's using 'migrate' but not 'migrate_plus', I'm getting this error:

Error: Class "Drupal\migrate_plus\Entity\MigrationGroup" not found in Drupal\inline_entity_form\MigrationHelper->getMigrationWithSharedConfiguration() (line 155 of /app/web/modules/contrib/inline_entity_form/src/MigrationHelper.php) #0 /app/web/modules/contrib/inline_entity_form/src/MigrationHelper.php(34): Drupal\inline_entity_form\MigrationHelper->getMigrationWithSharedConfiguration(Array)

Checking that the class exists before trying to call the load() method fixes it in my testing!

I'll attach a patch in a moment.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new741 bytes

Here's the patch! Please let me know what you think :-)

geek-merlin’s picture

Status: Needs review » Reviewed & tested by the community

Hmm, how did the 'migrate_group' key get in in the first place without migrate_plus?
But maybe that's an academic question, so don't care.
I suppose the patch fixes the issue for you?
Code-wise it's trivial and makes sense.
Setting RTBC.
Can you can add a MR?

  • podarok committed 0160cb67 on 2.0.x authored by dsnopek
    Issue #3325698 by dsnopek, geek-merlin: Using 'migrate' without '...
podarok’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Reviewed & tested by the community » Fixed

tnx

Status: Fixed » Closed (fixed)

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

geek-merlin’s picture

Version: 2.0.x-dev » 3.x-dev
Status: Closed (fixed) » Reviewed & tested by the community
Related issues: +#3401656: Clean up problematic 2.x branch

Bulk reopen.

dcam made their first commit to this issue’s fork.

dcam’s picture

Status: Reviewed & tested by the community » Needs review

Converted the patch into an MR as requested in #3.

Hmm, how did the 'migrate_group' key get in in the first place without migrate_plus?

There are so many migration examples out there that require Migrate Plus whether it's needed or not. I'm certain that someone could easily copy a migration YAML file that contains a migrate_group key and not realize what they've done. I've done it before.
Fortunately I caught it during a code review.

I tried to think of what I'd do differently here, if anything. But I think this is OK as it is. Don't feel like you need to credit me for this. I didn't do anything worth mentioning.

geek-merlin’s picture

Status: Needs review » Reviewed & tested by the community

Thx a bunch! So let's get this trival thing in!

geek-merlin’s picture

Status: Reviewed & tested by the community » Fixed

  • geek-merlin committed 19b69bab on 3.x authored by dcam
    Issue #3325698 by dcam, geek-merlin, dsnopek, podarok: Using 'migrate'...

Status: Fixed » Closed (fixed)

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