Closed (fixed)
Project:
Drupal core
Version:
8.5.x-dev
Component:
migration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Mar 2017 at 04:28 UTC
Updated:
30 Jan 2018 at 16:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
masipila commentedComment #4
masipila commentedComment #5
masipila commentedInitial patch attached.
This is intentionally including the 'custom_article_migration' migration in addition to the actual 'custom_article_revision_migration' instead of referring to the very similar example provided in EntityContentBase, see #2862662: Add documentation to EntityContentBase destination plugin
The reason for having a separate node migration example here is that:
Cheers,
Markus
Comment #6
masipila commentedComment #7
masipila commentedAdded the relation to EntityContentBase destination plugin API doc improvements. These two patches should be preferably be committed at the same time.
Markus
Comment #8
quietone commentedThe approach taken on this, see #5, works for me. It keeps the examples focused on the piece at hand without a lot of extraneous information.
Just two small nits.
This just sounded funny when I read it. Maybe 'means that when migrating revisions, the entity migration should include the revision IDs.' ?
And simply a suggestion here to add "Note that the revision ID is included in the entity migration as well as the entity revision migration." And make it really really clear about putting the revision id in the entity migration.
Comment #9
masipila commentedAddressing both comments from #8.
Cheers,
Markus
Comment #10
masipila commentedComment #11
mohit1604 commentedPatch looks good ! Thanks for the patch @masipila . Marking RTBC.
Comment #12
masipila commentedFound still two typos, attached patch fixes them.
Comment #13
heddnLast docs changes look like an improvement. LGTM.
Comment #14
mohit1604 commentedI agree @heddn .
Comment #15
masipila commentedI'll change the source of the example to use embedded data source instead of EmtpySource so that this will be consistent with other examples.
Comment #16
jofitzAs suggested by @masipila, replaced the EmptySource with an embedded data source.
Comment #17
masipila commentedWe need this source plugin in the example: https://api.drupal.org/api/drupal/core!modules!migrate!src!Plugin!migrat...
Comment #18
masipila commentedHere we go with embedded data source. I also incorporated the better labels for both examples from Jo's patch into this.
Comment #19
quietone commentedSorry, a few questions.
Can 'make sure ...' be 'make sure that the entity migration also includes the revision ID.'
Very nice, explaining what 'vid' means.
Should these be using migration_lookup? Or maybe another example or comment. I don't know, I am asking.
Edit: fixed a typo
Comment #20
jofitz1. Made suggested change.
3. I see your point, @quietone, that would be a regular use case, but I think this version is still valid (and keeps it as simple as possible). In reality I think it is unlikely anyone would use the embedded_data plugin with this destination plugin, but it provides a simple example.
Comment #21
masipila commentedRe #19.3. Nid could and should be mapped with migration_lookup. Vid can not because this migration creates the revisions.
Comment #22
masipila commentedWorking on this now.
Comment #23
masipila commentedAnd here we go. The revision example is now using migration_lookup to map the nid property.
Comment #24
phenaproximaThanks for taking this on, @masipila! Looking quite good right out of the gate.
Can we rephrase this first sentence? Something like "Entity revisions can only be migrated after the entity to which the revisions belong has been migrated." Also, "node content type" is redundant; we can just say "content type".
Can we elaborate on this at all? It sounds very ominous, but is not really explained.
We need a comma after the word "property".
We can remove the word "property" here.
Should say "Example of a base node migration, which must run before the revision migration", or similar.
Maybe "Example of the corresponding revision migration, which must be run after the above migration"?
Comment #25
masipila commentedComment #26
masipila commented1-6: Done.
Comment #27
phenaproximaNearly there!
Nit: "...of a given content type..."
"...entity migration did not include the revision ID..."
s/free/available.
Should be "Then, when revisions are migrated..."
Comment #28
masipila commented1-4: Done.
Comment #29
phenaproximaThanks, @masipila. First-class work as always.
Comment #30
gábor hojtsyThanks all, definitely looks like an improvement.