From 8b03d0d9200368f98757aec83b019e1b92f03180 Mon Sep 17 00:00:00 2001 From: sam <sam@1485048.no-reply.drupal.org> Date: Tue, 5 Dec 2017 10:22:08 +0800 Subject: [PATCH] Issue #2928474 by Sam152: Two of the same entity type and view mode appearing on the same page only shows a single ld snippet --- json_ld_schema.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json_ld_schema.module b/json_ld_schema.module index 2c04194..e6bbf7d 100644 --- a/json_ld_schema.module +++ b/json_ld_schema.module @@ -65,7 +65,7 @@ function json_ld_schema_entity_view(array &$build, EntityInterface $entity, Enti '#value' => json_encode($json_ld_entity->getData($entity, $view_mode) ->toArray(), JSON_UNESCAPED_UNICODE), ], - sprintf('json_ld_%s_%s', $entity->getEntityTypeId(), $view_mode), + sprintf('json_ld_%s_%s_%s', $entity->getEntityTypeId(), $entity->id(), $view_mode), ]; } } -- GitLab