Split-off from #2723847: Repeat field_prefix and field_suffix rendered.
After used bootstrp theme, the search form broken on search page, just config "Use search" permission, no "Use advanced search". if user have "Use advanced search" permission, search form will have another submit button under "Advanced Search".
Why it happen, becuase bootstrap theme alter search form, and set "#input_group_button" to keywords field. So before form render out, it will find the nearest button, then render as keywords "#field_suffix" and set access property to "FALSE" for that button, that's reason why submit broken. the same issue will happen on other forms if used #input_group_button property.
My solution is: after render button as "#field_suffix" of other element, just set a new property "input_group_button_processed", and mapping to variables, then there's a new variable "input_group_button_processed" for template fiels input--button*.html.twig, jsut output button if not input_group_button_processed.
Comment | File | Size | Author |
---|---|---|---|
#6 | bootstrap-search_not_working_on_search_page_for_anonymous_users-2765505-6.patch | 1.05 KB | nikathone |
#6 | interdiff-2765505-4-6.txt | 6.82 KB | nikathone |
Comments
Comment #1
markhalliwelleverright created an issue.
Comment #2
hswong3i CreditAttribution: hswong3i commentedLatest comment on #2723847-14: Repeat field_prefix and field_suffix rendered:
Migrate latest patch from #2723847-12: Repeat field_prefix and field_suffix rendered for review.
Comment #3
markhalliwellI really don't understand why I have to keep repeating myself. The above patch is NOT the correct approach. It will NOT be committed.
Comment #4
hswong3i CreditAttribution: hswong3i commented@markcarver after 5 months and looking forward for your official solution, but not yet solved by else commit and no luck that problem still exists, so I need to revoke this patch for encouraging other contributors for giving a hand. At least, it is a dirty workaround.
Comment #5
markhalliwellI don't commit dirty workarounds. I don't know when I'll be able to look at this, it hasn't really been a priority.
Also, the above patch(es) are just the same patch in #2723847: Repeat field_prefix and field_suffix rendered, which includes hacks for removing the "double prefix" (which that issue already solved).
This isn't a proper "solution".
Please find a different approach if I can't get to this fast enough for you.
Comment #6
nikathoneUploading a fix suggested by markcarver on slack
Comment #8
markhalliwellThanks @nikathone!
Comment #9
hswong3i CreditAttribution: hswong3i commentedwow @nikathone thank you very much~~~