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 is probably just an issue for people that have updated from a previous version, not installing/configuring for the first time.
A recent update to the module provides configurable error messages. The default messages contain some HTML. Because we updated the module and did not need to update the configurations, these new error messages display using the plain text format, resulting in the actual HTML being displayed in the message rather than the rendered HTML.
Comment | File | Size | Author |
---|---|---|---|
#3 | default_no_results_format-2644770-3.patch | 1.21 KB | bander2 |
Screen Shot 2016-01-05 at 1.54.29 PM.jpg | 32.37 KB | kevincrafts |
Comments
Comment #2
iamEAP CreditAttribution: iamEAP commentedThanks for the report Kevin.
Since the original, default values contained HTML, we ended up going with a formatted HTML field for those configuration messages. The markup eventually gets run through
check_markup()
. And it looks like that function will eventually pull a fallback filter if no filter is configured.It's possible that either your fallback filter is somehow unset, or you have your fallback filter is set to "plain text," which I suppose is a totally reasonable fallback depending on your site's use-case.
Suggestions on setting better default format values for those error message variables, welcome!
Comment #3
bander2 CreditAttribution: bander2 as a volunteer commentedIs it not a good idea to just set SGA_DEFAULT_ERROR_GSA_NO_RESULTS_FORMAT to 'filtered_html'?
Comment #4
iamEAP CreditAttribution: iamEAP commentedMy only concern there is that the filtered text format may not even exist... This could be for a variety of reasons: didn't install with the standard profile, D7 site was upgraded from D6 site, etc.
Probably rare. And even in those cases, it'd most likely fall back to plain text (current experience) anyway. So it might be fine?
Comment #5
bander2 CreditAttribution: bander2 as a volunteer commentedRight. filtered_html can be absent so we can't rely on it. I deleted it, enabled the module and got this error:
Missing text format: filtered_html.
And the display is messed up too.
Could we rely on filter_default_filter to just give us the default of the current logged in user? That way we kind of punt this to Drupal?
Comment #6
iamEAP CreditAttribution: iamEAP commentedHmm... That ends up happening by default if you pass in NULL to check_markup(). Maybe instead of calling that ourselves, we can conditionally pass in NULL if the format doesn't exist... Something like: