Closed (won't fix)
Project:
Drupal core
Version:
10.1.x-dev
Component:
migration system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
9 Dec 2020 at 09:22 UTC
Updated:
14 Mar 2023 at 07:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
huzookaA (temporary?) fix.
Comment #3
quietone commentedOn a fresh D7 I enabled entity_translation and added some nodes. The source column is empty for nodes that have not yet been translated. It is also empty when a node is translated and the language of the revision is the language of the source. And that fits with my memory when I was working on the migration of entity translation revisions.
Comment #4
huzooka@quietone yes, the source column is empty. But what kind of empty?
Based on the D7 migrate source DB fixture, the schema of that source column does not allows
NULLvalues. But sinceetr_createdwon't be empty, the currentNodeComplete::prepareRow()method sets an empty string''assource_langodefor those nodes default translation row which are translated withentity_translation. Andcontent_translation_sourcecannot be an empty string. It can beNULLor any kind of string which corresponds to an available language code (ID) (e.g.'en','es','custom_langode_id'). So for the row of node default translations,content_translation_sourceshould beNULL– because they represent the default translations source.Setting to NR.
Comment #5
quietone commented@huzooka, but the kind of empty doesn't matter in the source plugin.
Let me explain, and I should have noticed this earlier. The title states that the 'd7/NodeComplete source plugin adds invalid source "source_langcode" for "content_translation_source" destination property' and that is not true by definition. The job of the source plugin is to get the data from the source as is and not modified in any way. Yes, I know we have prepareRow() which allows some tweaking but we strive to minimize the changes to the source data itself in the source plugin. Changing/transforming the data to suit the destination is the job of the process pipeline.
The process for this property is simply,
content_translation_source: source_langcodeso the destination property does become an empty string. The empty string is an invalid language code and is not saved, the property on the entity is NULL. And we have proof of that because d7/MigrateNodeCompleteTest specifically tests that the content_translation_source value is NULL. That provides proof that the destination entity save is handling the empty string correctly.Based on that this would be a won't fix.
I don't think it is necessary to add a comment to the migration yml to clarify this. However, documentation is usually better than none so leaving this at NR.
Comment #6
wim leersConfirmed.
Based on this, marking as needing more info from @huzooka 🤓
Comment #7
huzookaComment #8
wim leersThanks, I meant to do that 🙈
Comment #12
kristen polThanks for reporting this issue and creating a patch. We rely on issue reports like this one to resolve bugs and improve Drupal core.
As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" more than a year ago, and there has been no activity here since that time.
Since we need more information (see #6 and before) to move forward with this issue, I am keeping the status at Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #14
kristen polSince it's been 7 months since the last request and we still need more information to move forward with this issue, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active" [or "Needs Work" if it has a patch, etc.].
Thanks!
Comment #15
kristen polActually, changing to "won't fix" per #5.