Closed (outdated)
Project:
Migrate
Version:
7.x-2.x-dev
Component:
Documentation
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2012 at 15:42 UTC
Updated:
21 Feb 2018 at 13:41 UTC
Jump to comment: Most recent
Comments
Comment #1
joachim commentedAnother very handy use cases would be taxonomy term reference fields where no term is found -- in essence, where source data gets dropped.
Comment #2
moshe weitzman commentedDid you see the migrate_message_x tables? Those are persistent stores. These messages/errors are linked from the Migrate_UI dashboard page.
Reopen if this does not suffice.
Comment #3
joachim commentedThat sounds like it would, but I'm not sure how to get messages into that.
What I've found in the example modules and the docs is these:
but both of them show a drupal_set_message-type message and after the import run, the 'Messages' column at admin/content/migrate/dashboard still says 0.
Comment #4
mikeryanTo save messages in the message table, use Migration::saveMessage(). There are a number of examples among the destination plugins.
Comment #5
joachim commentedAha! Got it now.
Could this be added to the example migration classes, say in one of the prepareRow() methods in WineWineMigration? It's not currently in either of them (or the docs pages that I've read so far -- granted I've not read every single one!)
Comment #6
mikeryanComment #7
joachim commentedWhat's the purpose of migrate_ui_capture_message()?
I've been using this for non-critical output that I don't need to save, but using it causes drush migrations to crash.
Comment #8
mikeryanThat's used by UI-based (Batch API) migration operations to pick up anything that would normally be displayed to the terminal with a drush-based migration, so it can be displayed when the next batch starts. It's not meant to be used from drush - I imagine it's crashing because the pages.inc file isn't going to be included from drush.
If you want to capture messages during a drush run, define your own function and set it as the migration display function as the UI does:
Comment #9
pifagor commented