Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The "Configuration Read-only mode" module locks forms that are for updating config entities.
SearchPageForm extends EntityForm, which means that search forms are locked when that module is installed.
#2794413: Search form is locked
Proposed resolution
Stop extending EntityForm
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#14 | increment-2845743-14.txt | 1.19 KB | pwolanin |
#14 | 2845743-14.patch | 4.02 KB | pwolanin |
#10 | Search_form_needlessly_extends_EntityForm-2845743-10.patch | 2.83 KB | Lal_ |
#2 | 2845743-searchpage-2.patch | 2.83 KB | tim.plunkett |
Comments
Comment #2
tim.plunkettComment #3
claudiu.cristeaThe patch looks good but what if a custom/contrib module class extends methods from SearchPageForm that are part of EntityForm, like ::form(), ::actions()?
Comment #4
tim.plunkettForms/controllers and form arrays AND entity handlers are all explicitly not protected by BC.
https://www.drupal.org/core/d8-bc-policy#controllers
Comment #5
claudiu.cristea@tim.plunkett, thank you for clarifying this. Given that SearchPageForm is not marked as @api this is not a BC break.
However, the
search_page
config entity claims that this form is an entity form:Also the docblock of \Drupal\search\Plugin\SearchInterface::searchFormAlter() makes a reference to \Drupal\search\Form\SearchPageForm::form() and that shold be adapted too.
Comment #7
pwolanin CreditAttribution: pwolanin as a volunteer and at SciShield commentedmarking as novice since it seems the remaining work consists of minor annotation and code comment fixes.
Comment #8
tameeshb CreditAttribution: tameeshb at Google Summer of Code commentedComment #9
pwolanin CreditAttribution: pwolanin as a volunteer and at SciShield commentedPlease don't leave assigned for more than a day (or at all - sometimes better just to leave a comment if you are immediately working on it)
Comment #10
Lal_Comment #11
claudiu.cristea#5 still not addressed.
Comment #12
pwolanin CreditAttribution: pwolanin as a volunteer and at SciShield commentedSeems to be the same patch?
Comment #13
joyceg CreditAttribution: joyceg commented@pwolanin,
so, reroll to 8.4-x-dev?
Comment #14
pwolanin CreditAttribution: pwolanin as a volunteer and at SciShield commentedOk, seems #10 is a re-roll for 8.4.x, but not labeled as such. Seems like tim's patch doesn't apply to 8.4.x using git apply
Here are also the fixes suggested by claudiu.cristea.
Comment #15
claudiu.cristea@pwolanin, Indeed, I suggested that entity "search" form is not an entity form and should be removed from annotation. This is correct, hope no custom or contrib code has referred the form by using the "search" key.
Looks good.
Comment #16
alexpottI've checked search_api - shouldn't be impacted. Tests pass too.
Comment #18
catchCommitted/pushed to 8.4.x, thanks!