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.
Bootstrap's bootstrap_button (theme_button override) replaces " with "" which will run into a simpletest bug with login forms #1481148: Simpletest does not consider form items of type 'button' for submitting forms
If you find your simpletest's not being able to login, this is likely the cause
/**
* Overrides theme_button().
*/
function bootstrap_button($variables) {
..
// This line break adds inherent margin between multiple buttons.
return '<button' . drupal_attributes($element['#attributes']) . '>' . $text . "</button>\n";
..
}
Versus https://api.drupal.org/api/drupal/includes!form.inc/function/theme_button/7
function theme_button($variables) {
...
return '<input' . drupal_attributes($element['#attributes']) . ' />';
}
Comments
Comment #1
markhalliwellThis isn't a bug. The
<button>
element is proper HTML5.Comment #2
dgtlmoon CreditAttribution: dgtlmoon commented<button>
sure is HTML5! in any case, this issue is worth reporting incase other people are running SimpleTest/D7 , not really sure what todo about this, it's not bootstrap's fault obviously, but worth notingComment #3
dgtlmoon CreditAttribution: dgtlmoon commentedChanging to 'works as designed'