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.

Comments

stephaneq’s picture

Status: Active » Needs review
StatusFileSize
new3.8 KB
jhodgdon’s picture

Status: Needs review » Postponed

Oh 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.

stephaneq’s picture

Issue summary: View changes
Status: Postponed » Needs review
StatusFileSize
new3.89 KB

Reroll

areke’s picture

Status: Needs review » Reviewed & tested by the community

Looks good; patch applies cleanly and correctly addresses the issue described.

jhodgdon’s picture

Thank you! Agreed on RTBC.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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