Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm running into some issues with the migrate field handler that was added for this module in #2007194: Migrate module support
In this particular case I am running into trouble when a row does not have a video url to import. Rather than doing nothing as expected, it seems like it's trying to still parse and save a URL even though one does not exist:
drush mmsg InstallNodeFeaturesVideo
sourceid1 message
2 <em class="placeholder">MigrateException</em>: parse_url(http://): Unable to parse URL
File
/home/pb/staging/2014-08-07_22-30-26/profiles/pub/modules/contrib/video_embed_field/video_embed_field.module
, line 204 in <em class="placeholder">MigrationBase->errorHandler()</em> (line <em
class="placeholder">530</em> of <em
class="placeholder">/home/pb/staging/2014-08-07_22-30-26/profiles/pub/modules/contrib/migrate/includes/base.
inc</em>).
2 parse_url(http://): Unable to parse URL
File
/home/pb/staging/2014-08-07_22-30-26/profiles/pub/modules/contrib/video_embed_field/video_embed_field.module
, line 204
For this migrate I'm mapping to "field_video" itself, as the subfield handler for "field_video:video_url" does not seem to work correctly - If i map to the subfield nothing imports at all.
Comments
Comment #1
james.williams CreditAttribution: james.williams at ComputerMinds commentedQuite a lot has changed in both the video_embed_field and migrate modules since this was reported. Is this problem still occurring? (I don't experience it when migrating into the video field.)
Subfields should only be used for things other than the video URL. (That would be the same for ordinary fields like text - you wouldn't use 'field_my_textfield:value' for the destination of a text field either, for example.)
Subfield handling generally can be improved via #2472687: Video embed field Migration subfields. It's possible that either of the patches there may fix this issue too anyway.