- 🇩🇪Germany daveiano
@stijndmd Your last changes breaks this for me. I debugged this down and in my case
$id_map = $row->getIdMap();
always returns
{"original_hash":"","hash":"","source_row_status":1}
.track_changes
is set to true for the migration. The strange behaviour is that when I check the $id_map inprepareRow
the hashes are in place and working.However, since track_changes is activated, there are only revisions created for changed rows, so I do not really get the requirement for these checks?
Using patch from #32 in the meantime.
- 🇫🇮Finland tvalimaa
Patch #32 worked for me but it didn't change revision author or revision message. Revision author and message was same than previous revision...
- 🇦🇺Australia mortim07
We have an issue where ::setRevisionCreationTime doesn't exist on the entity. To make this patch more robust we should be checking for the interface that implements ::setRevisionCreationTime - Drupal\Core\Entity\RevisionLogInterface.
- 🇨🇦Canada Shiraz Dindar Sooke, BC
Patch #39 works great for me.
Thanks everyone!
As an aside: this seems like it would be a rather common need and I'm a bit surprised by the lack of activity on this thread. But this is only place I see this happening.
- 🇫🇮Finland tvalimaa
Hi, I tested patch #39 and it looks like working like #32 with translations
drush mim --group=activity --update [notice] Processed 334 items (0 created, 301 updated, 0 failed, 33 ignored) - done with 'activities' [notice] Processed 334 items (0 created, 321 updated, 0 failed, 13 ignored) - done with 'activities_en'
destination: plugin: entity:node new_revision: yes
destination: plugin: entity:node translations: true new_revision: yes
- 🇫🇮Finland tvalimaa
Now API content has change so :
This is never be false because it always have array key.
if (!array_key_exists('original_hash', $id_map)
This is ok.
$id_map['hash'] !== $id_map['original_hash'])
Maybe?
if (!empty($id_map['original_hash']) && $id_map['hash'] !== $id_map['original_hash'])
- 🇧🇬Bulgaria pfrenssen Sofia
Idea: allow to set a revision log message and user ID.