Twitter bootstrap is very useful but i also often use Hierarchical select and i just managed to find what was breaking it.
There is a bug coming from form.inc file.
I can't actually say what in twitter_bootstrap_form_element() and twitter_bootstrap_button() breaks it but i have commented these 2 functions out and used
<?php
function twitter_bootstrap_button(&$vars) {
$element = $vars['element'];
$element['#attributes']['type'] = 'submit';
element_set_attributes($element, array('id', 'name', 'value'));
$element['#attributes']['class'][] = 'btn'; // Add bootstrap class
$element['#attributes']['class'][] = 'form-' . $element['#button_type'];
if (!empty($element['#attributes']['disabled'])) {
$element['#attributes']['class'][] = 'form-button-disabled';
}
return '<input' . drupal_attributes($element['#attributes']) . ' />';
}
?>
and now it works.
I can't really debug more cause i have (sadly) no clue what's going on in these functions but if someone knows i'll be happy to hear it.
Updates
Additional symptoms of this problem can be found at #1692198: Conflict with ajax.js. For cross reference, here is a bug report in the hierarchical_select issue queue: #2134201: Bootstrap Theme Breaks Hierarchical Select Dropbox.
Comments
Comment #1
heddnWhat features of hierarchical select are you using? Can you provide steps to reproduce the problem and a description of what you "broken" looks like?
Comment #2
andregriffin CreditAttribution: andregriffin commentedComment #3
natted CreditAttribution: natted commentedThe problem is likely to be related to the way twitter_bootstrap rewrites the html
<input>
to<button>
.I haven't investigated in this specific case but suspect it may be similar to the issue at http://drupal.org/node/1561100 . Also this one is again similar http://drupal.org/node/1692198
We could possibly setup a whitelist or configuration option in the theme to resolve this for specific modules incompatible with twitter_bootstrap.
Not sure if any maintainers are around at the moment though. :-)
Comment #4
andregriffin CreditAttribution: andregriffin commentedComment #5
andregriffin CreditAttribution: andregriffin commentedComment #6
natted CreditAttribution: natted commentedComment #7
frankbaele CreditAttribution: frankbaele commentedComment #8
bingorabbit CreditAttribution: bingorabbit commentedHope this may help: http://drupal.org/node/1877478#comment-6891894
Comment #9
mjs2020 CreditAttribution: mjs2020 commented#8 Solved my problem!
Comment #10
mahipal46 CreditAttribution: mahipal46 commented#8 solved me.
Comment #11
pianomansam CreditAttribution: pianomansam commentedI'm not sure why frankbaele marked as Closed Won't Fix without any discussion, because this issue is still outstanding. The solution in #8 does not fix the problem for me, nor does it get to the root cause.
Comment #12
markhalliwellBecause there is an issue in that module to address this. Many times the issues lie with modules being too specific in there JS selectors, which causes breaks amongst theme changes. This makes it their issue, not ours.
Comment #13
yenidem CreditAttribution: yenidem commentedHow can I apply the code above?
I used it in my template.php file but it did not work, can you please advice about it.
Comment #14
markhalliwellThis solution isn't applicable anymore, nor is it being worked on. The closest issue we currently have in the 7.x-3.x branch is the one I'm attaching as a related issue.