Hi,
as the title says, I have an issue on our website regarding the related blog posts macro.
Until last week everything was going well, but now somehow it inserts a javascript-tag and I do not know, where it comes from.
Background information:
The module I created works this way. I have set up a macro to format the post, like:
{# Layout #}
{% macro formatter(icon, gradient, ...) %}
<div>...</div>
{% endmacro %}
Then I have the blog_post_formatter to fill the formatter:
{% macro blog_post_formatter(blog_post, index, count) %}
{{ formatter(blog_icon, 'blog-teaser', '#f08714', ...) }}
{% endmacro %}
And then I have the related blogs macro to fill the blog_post_formatter:
{% related_blog_posts tags="{{ tagNames }}", post_formatter="blog_post_formatter", limit={{ module.count_limit }}, no_wrapper=True %}
This way is nessesary to reuse the layout for other type of content with custom variables (recent blogs, popular blogs, …) since the post_formatter in the related_blog_posts macro is limited to blog_post, index and count.
Okay.
Now I used JavaScript to display the resulting blog-posts not in list-style but in a carousel. Therefore I need to achieve this structure (simplified):
<section class="related-blogs">
<div>Blog Post 01</div>
<div>Blog Post 02</div>
<div>Blog Post 03</div>
</section>
That works well. In the design manager preview I get no error, no bug, it simply works.
But since last week I don’t have this structure anymore, though I didn’t touch the module. It inserts a script tag like this:
<section class="related-blogs">
<div>Blog Post 01</div>
<div>Blog Post 02</div>
<div>Blog Post 03</div>
<script>fetch(...) ...</script>
</section>
This script tag causes that the carousel does not work anymore.
Does anybody know where this script tag could come from? I ran this additional script in the console and got the same related-blogs structure a second time.
I would appreciate any help. You can reproduce this issue by having a look into this page: SYSTEMA Semiconductor Manufacturing Automation | Accenture. I currently made the carousel invisible but you can search in the developer tools for
<section class="related-blogs" style="display: none;">
Thanks!
Fabian
