Problem/Motivation
The acquia_search_preprocess_status_messages() needs refining. Right now it fires on all pages that have messages and throws a large notice when the message structure doesn't match what it's looking for, most notably on all pages for webforms.
Notice: Array to string conversion in acquia_search_preprocess_status_messages() (line 713 of modules/contrib/acquia_connector/acquia_search/acquia_search.module).
The structure for the message on the /admin/config/search/search-api page is @messages[0]->string = "Search API Solr 8.x-1.x support ends 2020-12-31. Ensure to upgrade to 8.x-3.x or newer."
The structure from webform is $message[0][0][#markup]->string = "Unchecking this box will delete ALL aliases you may have created for this form via the path module."
Steps to reproduce
Using Acquia Connector 8.x-1.23 and webform 8.x-5.23 with Drupal 8.9.12. Visit admin/structure/webform/config and see the Notice.
Proposed resolution
This preprocess status message function should be limited to the route /admin/config/search/search-api instead of running on all messages.
Comment | File | Size | Author |
---|---|---|---|
#4 | 3192623-4.patch | 1.43 KB | oheller |
Comments
Comment #2
oheller CreditAttribution: oheller at Electric Citizen commentedComment #3
oheller CreditAttribution: oheller at Electric Citizen commentedI suggest adding a path check since this only applies to the search-api admin page:
Comment #4
oheller CreditAttribution: oheller at Electric Citizen commentedComment #5
kporras07 CreditAttribution: kporras07 as a volunteer and at Evolving Web commentedI confirm this works as expected. Marking RTBC as the composer error is not related to the provided patch.
Comment #6
japerryThanks for the report and fix!
Comment #9
fadonascimento CreditAttribution: fadonascimento at CI&T for CI&T commentedThanks @oheller to fix that, I confirm this works as expected.
Hey @japerry Any plans to release a minor version to include this fix? I appreciate if you could do it.