Skip to content
Snippets Groups Projects

Issue #3505867: Error: Call to a member function hasLinkTemplate() on string

1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
+ 4
0
@@ -6,6 +6,7 @@ use Drupal\Core\Ajax\AjaxResponse;
@@ -6,6 +6,7 @@ use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\InvokeCommand;
use Drupal\Core\Ajax\InvokeCommand;
use Drupal\Core\Ajax\SettingsCommand;
use Drupal\Core\Ajax\SettingsCommand;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Cache\Cache;
 
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Path\CurrentPathStack;
use Drupal\Core\Path\CurrentPathStack;
@@ -101,6 +102,9 @@ class ResponsivePreview {
@@ -101,6 +102,9 @@ class ResponsivePreview {
if (!($entity = $this->routeMatch->getParameter($entity_type_id))) {
if (!($entity = $this->routeMatch->getParameter($entity_type_id))) {
return NULL;
return NULL;
}
}
 
if (!($entity instanceof EntityInterface)) {
 
return NULL;
 
}
if ($entity instanceof NodeInterface && !$this->previewEnabled($entity->type->entity)) {
if ($entity instanceof NodeInterface && !$this->previewEnabled($entity->type->entity)) {
return NULL;
return NULL;
}
}
Loading