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.
When converting existing titles to the title field, using the UI "replace" link which starts the batch replacement process, only the current version of the field is converted. Revisions are not converted. I've handled this quickly using a custom update handler, but wanted to see if this is just on oversite, or something intentional? And if it's an oversite, should I create a patch for updating revisions dess?
db_query('INSERT INTO {field_revision_title_field} (entity_type, bundle, deleted, entity_id, revision_id, language, delta, title_field_value, title_field_format) ' .
'SELECT f.entity_type, f.bundle, f.deleted, f.entity_id, b.revision_id, f.language, f.delta, v.title, f.title_field_format ' .
'FROM {field_revision_title_field} f ' .
'INNER JOIN {field_revision_body} b ON f.entity_type = b.entity_type AND f.entity_id = b.entity_id ' .
'INNER JOIN {node_revision} v ON b.revision_id = v.vid ' .
'WHERE f.revision_id <> b.revision_id '
);
Comments
Comment #1
plachYup, it's just an overshight: revison handling is not very mature in ET, hence this use case never came up before. A patch would be welcome :)
Comment #1.0
plachremove comment about entity_translation, it was wrong.