Bug in cse_adjustments.js — input placeholder
in progress
Mark Byart
There's a bug in the cse_adjustments.js file, related to the placeholder attribute for Google CSE. It seems to be a widespread bug as it’s occurring on a lot of UMN sites.
It happens when the placeholder attribute isn't set for the search box in configuration > search and metadata > UMN search settings. The lines causing the errors are:
const placeholder = drupalSettings.umn_search.placeholder_text;
input.placeholder = placeholder.length ? placeholder : '';
Placeholder returns null if there is no attribute set, so length() will not work as a test, and returns the error “Cannot read properties of null (reading 'length')”
Dimitri Tadege
in progress
Dimitri Tadege
planned
Dimitri Tadege
under review