On the display configuration of facet's, there's a setting for Pretty path alias.
Here, the option's title and field are ripped apart, depending on the viewport size:

The title is in the 4th col, while the input field (and help text) is in the 1st.

Not sure, maybe Facetapi is to blame?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sirtet created an issue. See original summary.

dasjo’s picture

Status: Active » Closed (works as designed)

The layout is controlled by facetapi, feel free to reopen and move this to the facet api queue if needed :)

sirtet’s picture

Issue summary: View changes
Status: Closed (works as designed) » Active
FileSize
39.32 KB

Ok i looked at the html, and it seems like there's a <div class="facetapi-global-setting"> missing around the pretty-path settings:

Before i move it, can you confirm this should be added by facetapi, and not by the module providing these settings?

Or, to compare, do you know of any other module adding elements there?

The GLOBAL SETTINGS part of the facetapi UI is very confusing anyways.
The floats are causing confusion.
Maybe i need to do a new ticket for that or re-focus this once it's moved, but wanted confirmation first that this problem here really is facetapi's job.

sirtet’s picture

This is from facetapi. It wraps all its global- items in that div. I think it can't do that for other modules after they add their stuff with form alter, no?

So pre- and suffix should be added here too i think.

 $form['global']['flatten'] = array(
    '#type' => 'radios',
    '#access' => $facet['hierarchy callback'],
    '#title' => t('Flatten hierarchy'),
    '#prefix' => '<div class="facetapi-global-setting">',
    '#suffix' => '</div>',
    '#default_value' => $global_settings->settings['flatten'],
    '#options' => array(0 => t('No'), 1 => t('Yes')),
    '#description' => t('Do not process hierarchical relationships and display facet items as a flat list.'),
  );
dasjo’s picture

ok i see. well, we could just add the same prefix / suffix in facetapi_pretty_paths_form_facetapi_facet_display_form_alter then. if you agree, could you do a patch for that?

or we move this to the facetapi queue and suggest to remove the floats there

donquixote’s picture

This patch moves the extra settings from facetapi_pretty_paths into a separate fieldset.
The form elements still have 'global[..]' as their name, and not 'facetapi_pretty_paths[..]', so we don't have to change everything else. Thanks to '#parents' => ['global'] on the new fieldset.

donquixote’s picture

The other solution would be to do like facetapi itself:

    '#prefix' => '<div class="facetapi-global-setting">',
    '#suffix' => '</div>',

In facetapi_facet_display_form() this is added to each component down in the "Global settings" fieldset.
I don't really like this, but this is how it is implemented there.