Follow-up to #2105609: Convert search_embedded_form_form to a Controller
There's a module core/modules/search/test/modules/search_embedded_form that is used in tests.
This module has a conceptual problems that should be fixed: It is using the config system to keep track of how many times the form has been submitted. I think it should be using the state system. This will need to be changed in both this module and the SearchEmbedFormTest class that uses it.
Basically, calls to ....->config('search_embedded_form.settings')-get('submitted') (and the set method) need to be changed to .....->state('search_embedded_form.submit_count')->get() (or set()). And the config YML file also needs to be removed.
This seems like an excellent Novice project.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | search_embedded_form-2122321-3.patch | 3.89 KB | stephaneq |
| #1 | search_embedded_form-2122321-1.patch | 3.8 KB | stephaneq |
Comments
Comment #1
stephaneqComment #2
jhodgdonOh sorry! We should wait on this patch until that other issue is committed. This looks like the right fix (and the test bot agrees); the patch will just need to be rerolled once that other one gets committed.
Comment #3
stephaneqReroll
Comment #4
areke commentedLooks good; patch applies cleanly and correctly addresses the issue described.
Comment #5
jhodgdonThank you! Agreed on RTBC.
Comment #6
webchickCommitted and pushed to 8.x. Thanks!