On import, if $handler->display->display_options['arguments']['group']['title'] is set, $handler->display->display_options['arguments']['uid']['title_enable'] will default to 1 (true).

This happens because on export, $handler->display->display_options['arguments']['uid']['title_enable'] only shows up in code if it is enabled, otherwise it doesn't show up. Proper solution would be always outputting $handler->display->display_options['arguments']['uid']['title_enable'] if $handler->display->display_options['arguments']['group']['title'] is set, but setting it to 0 if it is disabled.

Comments

dawehner’s picture

There is a conflict between the following two implementations of the checkbox ux pattern.

a) just use the checkbox for a ui element, so if uncheck truncate the title
b) use the checkbox to actually check when the view is executed and rendered. It seems to be views uses the element as ui element.

The actual code which sets the value automatically is

    if (!empty($options['title']) && !isset($options['title_enable'])) {
      $this->options['title_enable'] = 1;
    }

The suggested solution i have is to do something similar to views_handler_field::options_submit. It removes the title once you have unchecked the title checkbox. It should be consistent to other places.

dawehner’s picture

Status: Active » Fixed

Just went ahead and committed a fix which simply truncates the title if the checkbox isn't checked, though this doesn't work.

Though you would still have to reexport your view

Status: Fixed » Closed (fixed)

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