Insert Site content token function does not use correct drupal templates

Created on 19 October 2016, almost 9 years ago
Updated 8 October 2024, 10 months ago

Hello,

I defined some drupal templates for my content type "Newsletter" and they are working fine when viewing the node.
But when i embed the node inside my mailchimp campaign via "Insert site content" into one of my mailchimp template block, the templates are not found and default templates are used.

For example in my campaign i added the shortcut :

[mailchimp_campaign|entity_type=node|entity_id=48787|view_mode=full]

Theme Hook shown in my global outer template for my newsletter node rendered as "full" outside of mailchimp is :

<!-- FILE NAME SUGGESTIONS:
   * ds-1col--node--48787.html.twig
   x ds-1col--node-newsletter-full.html.twig
   * ds-1col--node-newsletter.html.twig
   * ds-1col--node-full.html.twig
   * ds-1col--node.html.twig
   * ds-1col.html.twig
-->
<!-- BEGIN OUTPUT from 'themes/fms_theme/templates/ds-1col--node-newsletter-full.html.twig' -->

But the same node rendered via the mailchimp campaign (as sent to mailchimp) is :

<!-- FILE NAME SUGGESTIONS:
   * ds-1col--node--48787.html.twig
   * ds-1col--node-newsletter-full.html.twig
   * ds-1col--node-newsletter.html.twig
   * ds-1col--node-full.html.twig
   * ds-1col--node.html.twig
   x ds-1col.html.twig
-->
<!-- BEGIN OUTPUT from 'modules/ds/templates/ds-1col.html.twig' -->

As you can see my template ds-1col--node-newsletter-full.html.twig is suggested but not used and the default template is used instead.

Any idea why ?

Thanks a lot.

🐛 Bug report
Status

Active

Version

1.0

Component

General

Created by

🇫🇷France gavrochelegnou

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States pookmish

    By changing the edit form to not use the admin theme, it is possible to use the default theme instead of the admin theme. This can be done by altering the existing route .

      protected function alterRoutes(RouteCollection $collection): void {
        if ($route = $collection->get('entity.mailchimp_campaign.edit_form')) {
          $route->setOption('_admin_route', FALSE);
        }
      }
  • Status changed to Closed: won't fix 16 days ago
  • 🇺🇸United States xenophyle

    Thanks for submitting this ticket — and sorry we didn’t get back to you about it sooner. We are cleaning up old issues and issue for old versions and are going to close this one. If this issue is still relevant for you, please re-open it and update the “Version” field, and include any updates to the behavior you are seeing.With a smaller issue queue, we’ll have an easier time getting back to you.

Production build 0.71.5 2024