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.
Motivation
hook_node_validate() and hook_node_submit() are hooks which can be considered already deprecated in d7: No other entity types have them and it's not best practice to use them: Instead, you should use a form element validation and a form builder callback to extract form values.
Proposed resolution
Convert menu_ui_node_submit() an entity builder and remove it.
Remaining tasks
-
User interface changes
API changes
hook_node_submit() would be removed
Comments
Comment #1
fagoI'm unsure whether this is still on the table for 8.0.x/8.x, please bump it accordingly as necessary. This is an API change, although it should unproblematic for everyone following best practices.
Comment #2
fagoRelated iss
Comment #3
BerdirDealt with in #2406103: Remove hook_node_validate() and hook_node_submit() because they bypass the entity API now.