### 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()`.

Comments

le72 created an issue. See original summary.

le72’s picture

Version: 8.x-1.0-beta31 » 2.0.13
joseph.olstad’s picture

Thanks for reporting, do you have a patch?

le72’s picture

I created one, but it is just fix in `entity_translation_unified_form_node_form_submit` and use getRevisionLogMessage(); instead of revision_log->value;

joseph.olstad’s picture

Status: Needs work » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.