Hi,

I wanted to validate my page by W3C validator and it claimed some mistakes in the code - they were reported a year ago but still the appear with the current version of this module:

end tag for "select" which is not finished - this appears just after the first selection list of my hierarchical select activitated exposed filter with which users can filter node with a hierachical taxonomy:


... selection-list...

<select name="marken[flat_select]" class="form-select flat-select" id="edit-marken-flat-select" ></select><div class="nojs"><input type="submit" name="op" id="edit-marken-nojs-update-button" value="Aktualisieren" class="form-submit update-button" />

The shown select-tag has no option-tags in it.

A second mistake appears in the code just before the select list: reference to non-existent ID "edit-marken". the code:

<div class="views-exposed-widget edit-marken">
<label for="edit-marken">
Marke </label>

It is the beginning of the exposed filter where hierarchical select is enabled. I also enabled labels for the several hierarchies and "marken" should be the label for the filter which is named "Marken" - but the hidden input field is named with id="edit-marken-hsid" and the select tag if id="id="edit-marken-hierarchical-select-selects-0"

Greez,
Tobias

Comments

Wim Leers’s picture

Priority: Normal » Minor
Status: Active » Needs work

Could you maybe roll a patch? :)

Wim Leers’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of response.

tobiberlin’s picture

Status: Closed (won't fix) » Active

re-open it... sorry for not responding... I cannot as I am not familiar with rolling a patch - I even did not find out where to change these things.

Wim Leers’s picture

Status: Active » Closed (cannot reproduce)

I can't even reproduce this. So, until you find the cause, I'm going to assume this is a problem with your installation only. Sorry.

mecmartini’s picture

Status: Closed (cannot reproduce) » Needs review

Hi,

I had the same problem with:

I wanted to validate my page by W3C validator and it claimed some mistakes in the code - they were reported a year ago but still the appear with the current version of this module:

end tag for "select" which is not finished - this appears just after the first selection list of my hierarchical select activitated exposed filter with which users can filter node with a hierachical taxonomy:

... selection-list...

<select name="marken[flat_select]" class="form-select flat-select" id="edit-marken-flat-select" ></select><div class="nojs"><input type="submit" name="op" id="edit-marken-nojs-update-button" value="Aktualisieren" class="form-submit update-button" />

The shown select-tag has no option-tags in it.

I found a cause into _hierarchical_select_process_render_flat_select function, so I did a fix changing the following code:

  $element = array(
      '#type' => 'select',
      '#multiple' => ($config['save_lineage'] || $config['dropbox']['status']),
      '#options' => $options,
      '#value' => array_keys($options),
      // Use a #theme callback to prevent the select from being wrapped in a
      // div. This simplifies the CSS and JS code.
      '#theme' => 'hierarchical_select_select',
      '#attributes' => array('class' => 'flat-select'),
    );

to:

  if (!empty($options)) {
  	$element = array(
      '#type' => 'select',
      '#multiple' => ($config['save_lineage'] || $config['dropbox']['status']),
      '#options' => $options,
      '#value' => array_keys($options),
      // Use a #theme callback to prevent the select from being wrapped in a
      // div. This simplifies the CSS and JS code.
      '#theme' => 'hierarchical_select_select',
      '#attributes' => array('class' => 'flat-select'),
    );
  }

stefan.r’s picture

Issue summary: View changes
Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.