Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated/removed form alter hook with D10 version #4006

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

jastraat
Copy link
Contributor

@jastraat jastraat commented Aug 28, 2023

hook_field_widget_multivalue_form_alter was deprecated in Drupal 9.2 and removed in Drupal 10.

https://api.drupal.org/api/drupal/core%21modules%21field%21field.api.php/function/hook_field_widget_multivalue_form_alter/9

This hook was used to identify json form widget forms and in its absence, json_form_widget_file_submit() is not run on node form submission. The result is that the files uploaded through the node form are left in temporary status and the file usage table also not updated. This can result in data loss when temporary files are cleaned up.

  • Test coverage exists
  • Documentation exists

QA Steps

  • Create a dataset through the node form UI and make sure to upload a distribution file.
  • After submitting the form, visit admin/content/files and confirm that the file has a status of "Permanent"

@jastraat jastraat requested a review from janette August 28, 2023 20:18
@janette janette merged commit d12af26 into 2.x Aug 28, 2023
12 checks passed
@janette janette deleted the json_form_widget_d10 branch August 29, 2023 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants