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.
This patch adds helpful trim() statements to the breadcrumb textareas.
Also, the same validate function has to name a field that is erroring. Without that, there is no error msg. Kinda hard to know what to fix.
Comment | File | Size | Author |
---|---|---|---|
#2 | custom_breadcrumbs-306637.patch | 1.25 KB | TUc |
#1 | mw.patch | 1.04 KB | moshe weitzman |
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedUgh
Comment #2
TUc CreditAttribution: TUc commentedI made a patch for the same issue, but one that also saves the sanitized breadcrumb textareas. From a don't-mess-with-user-input perspective Moshe's approach looks better to me.
I build on his patch in order to set a field in the form_set_error(), choosing to error against the textarea with "missing" path or title strings.
Comment #3
thePanz CreditAttribution: thePanz commentedPatch tested. Works fine on latest drupal--6-1-4 version.
Maybe you should add trim() check also before saving user text-areas.
Regards
Comment #4
MGN CreditAttribution: MGN commentedThis patch also fixes the bug reported in #343608: Wrong implementation of form_set_error.
Comment #5
MGN CreditAttribution: MGN commentedCommitted to 6.x-1.x-dev