Commit fa3b6792 authored by Andrii Chyrskyi's avatar Andrii Chyrskyi Committed by Andrii Chyrskyi
Browse files

Merge pull request #2814 from goalgorilla/issue/3269440-social-landing-page-warning

Issue #3269440 by Ressinel: Social 11.1.x - social_landing_page yields an only flip STRING and INTEGER values! in Drupal\Core\Entity\EntityStorageBase->loadMultiple
parent 867a860d
Loading
Loading
Loading
Loading
+5 −7
Changes for modules/social_features/social_landing_page/social_landing_page.module: 5 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -366,18 +366,16 @@ function social_landing_page_theme_suggestions_page_alter(array &$suggestions, a
    // Get the status code.
    $status_code = $exception->getStatusCode();
    if ($status_code == 404) {

      // Get current node.
      /** @var \Drupal\node\NodeInterface $node */
      $node = \Drupal::routeMatch()->getParameter('node');
      if (!is_object($node)) {
        $node = \Drupal::service('entity_type.manager')
          ->getStorage('node')
          ->load($node);
      }

      // Overrides template for 404 page only if target node has a landing page
      // type.
      if ($node instanceof NodeInterface && $node->getType() == 'landing_page') {
      if (
        $node instanceof NodeInterface &&
        $node->getType() === 'landing_page'
      ) {
        $suggestions[] = 'page__node__landing_page';
      }
    }