Added initial Migrate Preview module. #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem/Motivation
For debugging a migrations, it is sometimes very useful to see what your source like or what kind of effect your process plugins have.
This code displays a preview of a migration.
Proposed solution
This code extends the MigrateExecutable from Migrate Tools. It tries to ignore migration statuses and prevents stuff from being saved.
The results are displayed in two tables:
This is work in progress. The UI could be improved a lot and it should perhaps be designed similar to the UI of Feeds Import Preview: https://www.drupal.org/project/feedspreview/
The current code doesn't depend on Feeds Migrate code. It doesn't event integrate with it. It's more an addition to Migrate Tools, so perhaps when the code gets mature, it could be added to Migrate Tools. Hopefully in a way that Feeds Migrate can just use MigratePreviewExecutable.
Example/QA
Add a 'standard' migration, using Migrate Plus. Click on a migration to see its information and click the "Preview" tab.