Needs review
Project:
Contact
Version:
1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Aug 2016 at 09:49 UTC
Updated:
25 Feb 2026 at 21:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
berdirThis is actually a follow-up of #306662: Add redirect option to site-wide contact forms. thanks for creating.
Comment #3
hussainwebHere is an attempt at this. This means that the message can never be blank, which kind of makes sense. The default message will be shown even if it is blank in the contact form settings.
Comment #4
berdirI think not having a message is fine.
I wouldn't add a fallback there, just in the settings form. For a new form, set this value. if it is an existing form that has no value, then that is fine.
Comment #5
alexpottI agree with @Berdir
Comment #6
hussainwebYes, when I actually saw the UI, the description said 'Leave blank for no message'. So, updating the patch to write to the form instead.
Comment #7
alexpottLet's add some test coverage for this.
Comment #9
hussainwebI don't think the tests are particularly of high value but here goes.
Comment #12
hussainwebThis should fix the tests.
Comment #13
andypostThere will be always default for new forms, so "Leave blank" is wrong
Comment #14
hussainweb@andypost,
Are you sure about that? See this snippet of code:
So, it is possible for the message to be blank. I don't see anything in the save logic to set the message to a default value.
Comment #15
berdirI would suggest we change \Drupal\contact\Tests\ContactSitewideTest::addContactForm() do make the message default NULL and only add it to $edit if one is provided ('' needs to be a valid, explicitly empty string). That should give us more test coverage of this as well.
Also, I suggest you put it in ContactSitewideTest, this is specifically to being able to store messages.
And #14 is correct, but it would be good to have explicit test coverage for that if we don't have it yet.
Comment #29
quietone commentedThe Contact Module was approved for removal in #3476879: [Policy] Move Contact module to contrib.
This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
The deprecation work is in #3520460: [meta] Tasks to deprecate the Contact module and the removal work in #3520466: [meta] Tasks to remove Contact module.
Contact will be moved to a contributed project after the Drupal 12.x branch is open.
Comment #31
andypostComment #34
mdranove commented