Commit 9d6f8cad authored by Ramu Challa's avatar Ramu Challa Committed by Markus Kalkbrenner
Browse files

Issue #3238168 by ramu_bharu, beatrizrodrigues, PhilY, baskaran, mkalkbrenner:...

Issue #3238168 by ramu_bharu, beatrizrodrigues, PhilY, baskaran, mkalkbrenner: Error: Call to a member function getType() on null in Drupal\facets\Plugin\facets\processor\BooleanItemProcessor->supportsFacet() (line 102 of modules/contrib/facets/src/Plugin/facets/processor/BooleanItemProcessor.php)
parent d50177be
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ use Drupal\facets\Widget\WidgetPluginManager;
use Drupal\facets\Processor\SortProcessorInterface;
use Drupal\Core\Form\SubformState;
use Drupal\Core\Url;
use Symfony\Component\HttpFoundation\RedirectResponse;

/**
 * Provides a form for configuring the processors of a facet.
@@ -144,6 +145,15 @@ class FacetForm extends EntityForm {
   * {@inheritdoc}
   */
  public function form(array $form, FormStateInterface $form_state) {
    // Redirect to facets settings page if Field Identifier is not set.
    if ($facets = \Drupal::routeMatch()->getParameter('facets_facet')) {
      if ($facets->getFieldIdentifier() == null) {
        $facet_settings_path = $facets->toUrl('settings-form')->toString();
        $response = new RedirectResponse($facet_settings_path);
        $response->send();
        return;
      }
    }
    $form['#attached']['library'][] = 'facets/drupal.facets.admin_css';

    /** @var \Drupal\facets\FacetInterface $facet */