### Problem/Motivation
When saving a taxonomy term form that uses a custom translatable field on Drupal 10 with the Entity Translation Unified Form (ETUF) module enabled, a fatal error/warning is thrown.
The function `entity_translation_unified_form_node_form_submit()` assumes that the form entity is always a `Node`, causing it to crash when trying to read Node-specific properties (such as `title` or `status`) on a `Taxonomy Term` entity which does not contain those fields.
#### Error Message:
```text
Warning: Attempt to read property "value" on null in entity_translation_unified_form_node_form_submit() (line 1317 of modules/contrib/entity_translation_unified_form/entity_translation_unified_form.module).
entity_translation_unified_form_node_form_submit()
call_user_func_array() (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 597)
Drupal\Core\Form\FormBuilder->processForm() (Line: 326)
...
```
### Steps to reproduce
1. Setup a Drupal 10 site with ETUF enabled.
2. Add a custom translatable field to a Taxonomy Vocabulary.
3. Attempt to create or edit a taxonomy term using the unified form layout.
4. Click Save. The error is thrown upon form submission.
### Proposed resolution
Modify `entity_translation_unified_form_node_form_submit()` to verify that the entity type is explicitly a node before attempting to extract properties like `title` or `status`. If it is a non-node entity like `taxonomy_term`, the submission handler should safely return early or use conditional field checks like `$entity->hasField()`.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | entity_translation_unified_form_revision_log_null.patch | 712 bytes | le72 |
Comments
Comment #2
le72Comment #3
joseph.olstadThanks for reporting, do you have a patch?
Comment #4
le72I created one, but it is just fix in `entity_translation_unified_form_node_form_submit` and use
getRevisionLogMessage();instead ofrevision_log->value;Comment #6
joseph.olstad