When I export a facet config to features, it includes this line:

'submit_realm' => 'Save and go back to realm settings',
CommentFileSizeAuthor
#4 superfluous-features-data-1822078-4.patch470 bytescpliakas

Comments

joachim’s picture

Version: 7.x-2.x-dev » 7.x-1.2

Fixing version.

cpliakas’s picture

Version: 7.x-1.2 » 7.x-1.x-dev

We have resolved some more urgent bugs, so I think it is time to take a closer look at this as it could cause some unforeseen issues down the road.

Thanks for reporting,
Chris

cpliakas’s picture

Issue summary: View changes

Confirmed latest version of Features (2.0) and Facet API. Raw export is below, you can see the "submit_realm" as mentioned in the OP.

/**
 * Implements hook_facetapi_default_facet_settings().
 */
function facet_api_test_facetapi_default_facet_settings() {
  $export = array();

  $facet = new stdClass();
  $facet->disabled = FALSE; /* Edit this to true to make a default facet disabled initially */
  $facet->api_version = 1;
  $facet->name = 'apachesolr@solr::created';
  $facet->searcher = 'apachesolr@solr';
  $facet->realm = '';
  $facet->facet = 'created';
  $facet->enabled = FALSE;
  $facet->settings = array(
    'operator' => 'and',
    'hard_limit' => '50',
    'dependencies' => array(
      'roles' => array(),
      'bundle' => 'none',
      'bundle_selected' => array(),
    ),
    'facet_mincount' => 1,
    'facet_missing' => 0,
    'flatten' => 0,
    'query_type' => 'date',
    'limit_active_items' => 0,
    'date_granularity' => 'YEAR',
  );
  $export['apachesolr@solr::created'] = $facet;

  $facet = new stdClass();
  $facet->disabled = FALSE; /* Edit this to true to make a default facet disabled initially */
  $facet->api_version = 1;
  $facet->name = 'apachesolr@solr:block:created';
  $facet->searcher = 'apachesolr@solr';
  $facet->realm = 'block';
  $facet->facet = 'created';
  $facet->enabled = TRUE;
  $facet->settings = array(
    'weight' => 0,
    'widget' => 'facetapi_links',
    'filters' => array(),
    'active_sorts' => array(
      'active' => 'active',
      'indexed' => 'indexed',
      'count' => 0,
      'display' => 0,
    ),
    'sort_weight' => array(
      'active' => '-50',
      'indexed' => '-49',
      'count' => '0',
      'display' => '0',
    ),
    'sort_order' => array(
      'active' => '3',
      'indexed' => '4',
      'count' => '4',
      'display' => '4',
    ),
    'empty_behavior' => 'none',
    'facet_more_text' => 'Show more',
    'facet_fewer_text' => 'Show fewer',
    'soft_limit' => '20',
    'nofollow' => 1,
    'show_expanded' => 0,
    'empty_text' => array(
      'value' => '',
      'format' => 'filtered_html',
    ),
    'submit_realm' => 'Save and go back to realm settings',
  );
  $export['apachesolr@solr:block:created'] = $facet;

  return $export;
}
cpliakas’s picture

Status: Active » Needs review
StatusFileSize
new470 bytes

Facet API has an admittedly janky system to capture the values from the setting form as I did not know about form_state_values_clean() at the time I created the module.

The attached patch uses Facet API's custom mechanism to remove the value referenced in the OP.

  • cpliakas committed 19b288d on 7.x-1.x
    Issue #1822078 by joachim, cpliakas: Superfluous data exported to...
cpliakas’s picture

Status: Needs review » Fixed

I was bold and committed the fix since this is a small change that will have no adverse effects.

Status: Fixed » Needs work

The last submitted patch, 4: superfluous-features-data-1822078-4.patch, failed testing.

cpliakas’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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