Problem/Motivation

See #3566536: [meta] eliminate core .module files

Proposed resolution

  • Move the logic of contact_user_profile_form_submit() and contact_form_user_admin_settings_submit() to the hooks class.
  • Deprecate the 2 procedural functions

See also comment #4 to find out why we cannot use #config_target.

Remaining tasks

None.

User interface changes

None.

Introduced terminology

None.

API changes

The contact_user_profile_form_submit() and contact_form_user_admin_settings_submit() functions are deprecated.

Data model changes

None.

Issue fork drupal-3566888

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

claudiu.cristea created an issue. See original summary.

nicxvan’s picture

There is a failure due to the config target change most likely.

I am not sure why that would fail your changes looks right.

claudiu.cristea’s picture

That is a very weird failure. I suspect a bug in config validation

EDIT: The problem is that, with #config_target, the entire contact.settings object gets validated. This didn't happen with the procedural code because there only the value was set w/o any validation. Now, #config_target triggers the validation of the whole object but the default value of default_form is feedback, meaning the validation is looking for a contact form with the name contact.form.feedback, which is not shipped.

As a conclusion, I don't think we can use #config_target, because we don't expose the other config values in the form.

claudiu.cristea’s picture

Issue summary: View changes
claudiu.cristea’s picture

Assigned: claudiu.cristea » Unassigned
Status: Active » Needs review

Ready for review. Please read also comment #4

nicxvan’s picture

Status: Needs review » Reviewed & tested by the community

I think all feedback has been addressed, this should be good!

Only remaining question I have is whether this needs a follow up to handle the valuation issue?

I took a pass at credit.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and 11.x, thanks!

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.

  • catch committed d840edba on 11.x
    task: #3566888 Move contact module form callbacks from procedural to...

  • catch committed 47ae02bb on main
    task: #3566888 Move contact module form callbacks from procedural to...

Status: Fixed » Closed (fixed)

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