- π¨π¦Canada joseph.olstad
@alexpott ,
On translations of an entity a core message advises us to edit the non-translateable fields on the source language. The test code included with this MR illustrates a lack of validation to this effect. Translation functionality for contrib entities such as "Paragraphs" is otherwise broken. While core node entities do not have this problem by themselves, when other entity types such as "Paragraphs" are used with nodes, this issue surfaces.
Currently there is no other known solution.
The tests-only fail illustrates where the failure occurs. All tests pass with the MR code in it's entirety.
- π¬π§United Kingdom alexpott πͺπΊπ
This bug sounds really tricky, however the fix concerns me because of the hardcoding of the status field. The points to the possibility of unintended impacts. Is there another way to fix this or not hardcode the status field?
- π¨π¦Canada joseph.olstad
The title accurately describes what leads us to this issue.
Patch 112 is incorrect, it is missing a change.
Here is a link to the MR patch https://git.drupalcode.org/project/drupal/-/merge_requests/9429.patch
- πΊπ¦Ukraine Foxy-vikvik
I added the following conditions:
if (empty($widget) && $subform_position = array_search('subform', $field_state['array_parents'])) { $widget = NestedArray::getValue($form, array_slice($field_state['array_parents'], 0, $subform_position)); }
- πΊπ¦Ukraine Foxy-vikvik
It happens only when translating the node with paragraphs
- πΊπ¦Ukraine Foxy-vikvik
@quietone I did the same steps as on the description BUT
We use paragraphs module in our project and some fields we don't translate that's why I found NULL in $widget
I think it is related to the $field_state['array_parents'] - π³πΏNew Zealand quietone New Zealand
@foxy-vikvik, can you provide the steps that caused the null value? That is needed to ensure the test is robust. Also, uploading screenshots of your IDE is not something we do in the Drupal core issue queue.
I have only noticed the last two comments and am setting back to Needs Works so that get input from the people working on this issue.
And as I skimmed through and read the MR I think the title here needs to change to describe the fix, which is about access.
- πΊπ¦Ukraine Foxy-vikvik
Patched based on the "patch for the comment #94": https://www.drupal.org/project/drupal/issues/3025039#comment-15576672 π New non translatable field on translatable content throws error Needs work
for Drupal 10.3
- πΊπ¦Ukraine Foxy-vikvik
We need to add a condition if the <?PHP
!empty($widget)
?> - π¨π¦Canada joseph.olstad
- MR has tests
- MR pipeline passes tests
- MR pipeline tests-only test is failing as expected
- Patch is fixing this issue in the wild
- π¨π¦Canada joseph.olstad
Pipeline for MR 9429 passed and is green (YAY!).
https://git.drupalcode.org/issue/drupal-3025039/-/pipelines/276042
Running the tests-only job now, normally expect it to fail.