From 780cf6efb93aa8e1c4257a4d921f5303795b19e9 Mon Sep 17 00:00:00 2001 From: Adam <607975+adam-vessey@users.noreply.github.com> Date: Mon, 3 Jun 2024 17:38:10 -0300 Subject: [PATCH] Only generate tokens for our Islandora-esque nodes. (#1025) --- islandora.tokens.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/islandora.tokens.inc b/islandora.tokens.inc index f528dee3d..d2c424c53 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':