Not sure if this is Migrate's fault or Migrate Upgrade or the source DB or what, but!

When I attempt to upgrade buytaert.net's database, the UI gets stuck at 55%.

Watchdog implies that it's stuck in an infinite loop:

1. migrate_upgrade - Importing Drupal 7 field formatter configuration
2. php - Warning: array_intersect_key(): Argument #1 is not an array in Drupal\Core\Field\FormatterPluginManager->prepareConfiguration() (line 159 of /Users/webchick/Sites/imp2/core/lib/Drupal/Core/Field/FormatterPluginManager.php).
3. migrate_upgrade - Importing Drupal 7 field formatter configuration
4. Warning: array_intersect_key(): Argument #1 is not an array in Drupal\Core\Field\FormatterPluginManager->prepareConfiguration() (line 159 of /Users/webchick/Sites/imp2/core/lib/Drupal/Core/Field/FormatterPluginManager.php).
etc.

Like 21+ pages of that. ;)

There's also no way to kill the migration that I can see so that's a lot of fun. :D

Comments

webchick created an issue. See original summary.

webchick’s picture

Oh, I guess this did eventually happen, about a half hour later:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=2&op=do_nojs&op=do
StatusText: Internal Server Error
ResponseText: 
500 Internal Server Error
Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator at 
x@x.x to inform them of the time this error occurred,
and the actions you performed just before this error.
More information about this error may be available
in the server error log.
mikeryan’s picture

There's also no way to kill the migration that I can see so that's a lot of fun. :D

#2403421: Implement migrate-stop command for D8 is blocked on #2545672: Handle various migration interruption scenarios is blocked on #2429085: Track current state of migrations... FYI;-).

Looking at this now...

mikeryan’s picture

Using drush migrate-upgrade rather than the UI does complete, with (many) errors. The first, before we get to d7_field_formatter_settings, is d7_field_instance:

Importing d7_field_instance
Attempt to create a field {$this->field_name} that does not exist on entity type {$this->entity_type}.                                              [error]
(/Users/mryan/Sites/IMP2/core/modules/field/src/Entity/FieldConfig.php:292)

The problem? While d6_field_instance depends on d6_node_type, d7_field_instance does not have a dependency on d7_node_type (which has not yet implemented). Without node types being created to attach field instances to, everything involving fields crashes and burns.

d7_node_type is being introduced in #2423103: Migration Files for Drupal 7 Content, until then d7_field_instance and anything dependent on it will not work. Can we separate the node type migration into its own relatively small patch so the existing field migrations can actually work before we get the whole node migration?

mikeryan’s picture

Note this also shows a small bug in FieldConfig:

        throw new FieldException('Attempt to create a field {$this->field_name} that does not exist on entity type {$this->entity_type}.');

Oops! For lack of double-quotes...

mikeryan’s picture

mikeryan’s picture

Status: Active » Postponed

This should be fixed as part of #2423103: Migration Files for Drupal 7 Content.

mikeryan’s picture

Status: Postponed » Closed (duplicate)

#2423103: Migration Files for Drupal 7 Content will fix the field formatter migration.

benjy’s picture

Out of interest, where was the infinite loop? And how does that issue fix it?

mikeryan’s picture

That was in the contrib migrate_upgrade UI... Which, now that you mention it, may mean the batch processing in the UI is not properly dealing with exceptions (which is a separate issue from the field formatter issue that triggered it). Should we repurpose this issue for it, open a new issue (against what? the UI is not in core yet...), or add it to the UI meta where the patch is?

benjy’s picture

Yeah a new issue works for me, to investigate if fatal errors are not correctly reported when using the Migrate Upgrade UI