From 04bb36d9815d6af1f269a6c9edca435e7bbcb9bf Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Mon, 3 Jun 2024 17:01:07 -0300 Subject: [PATCH] Only generate tokens for our Islandora-esque nodes. --- islandora.tokens.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/islandora.tokens.inc b/islandora.tokens.inc index ab7bb0736..541205d64 100644 --- a/islandora.tokens.inc +++ b/islandora.tokens.inc @@ -80,6 +80,9 @@ function islandora_tokens($type, $tokens, array $data, array $options, Bubbleabl return; } $islandoraUtils = \Drupal::service('islandora.utils'); + if (!$islandoraUtils->isIslandoraType('node', $data['node']->bundle())) { + return; + } foreach ($tokens as $name => $original) { switch ($name) { case 'media-original-file:basename':