New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with assets field in blog collection scope #830

jeffwhitfield opened this Issue Aug 1, 2016 · 1 comment


None yet
2 participants

jeffwhitfield commented Aug 1, 2016

Hey folks,

Posted this on the Lodge a few days ago but haven’t gotten a response. :P

Alright, so I just got around to upgrading my personal site to the latest stable 2.x version from the betas. However, I'm running into a problem with one of my collections. For some reason, the image asset variable I have set wants to repeat the same image for other entries within a paginated loop. Very, very weird! You can see this happening on the dev version of my site:

Notice that the Star Wars Aftermath image that appears in the second post gets repeated in the remaining posts. Wha?? :P

The site is currently running on a SiteGround cloud server with PHP 5.6.10.

So, here's what I have as the main collection tag in my blog index template:

          {{ collection:blog limit="5" paginate="true" as="entries" }}
            {{ if no_results }}
                <p>Sorry, no blog posts! Try back later!</p>
            {{ /if }}

            {{ entries }}
              {{ partial:blog-summary }}
            {{ /entries }}

            {{ paginate }}
            <nav class="text-center">
              {{ auto_links }}
             {{ /paginate }}

          {{ /collection:blog }}

And here’s the partial for the blog summary:

        <article class="blog-summary" itemscope itemtype="">
            <h2 itemprop="name">
                {{ if website }}
                <a href="{{ website }}" title="Visit site for post titled '{{ title }}'" itemprop="isBasedOnUrl"><i class="fa fa-external-link"></i> {{ title }}</a>
                {{ else }}
                <a href="{{ url }}" title="Read more about '{{ title }}'">{{ title }}</a>
            {{ /if }}
                    <span itemprop="author">Jeff Whitfield</span> |

                    Posted <time itemprop="datePublished" datetime="{{ date format="Y-m-d" }}">
                    {{ if (date | days_ago) < 21 }}
                        {{ date | relative }}
                    {{ elseif (date | format:Y) == now | format:Y }}
                        {{ date format="M j" }}
                    {{ else }}
                        {{ date format="M j, Y" }}
                    {{ /if }}
                    </time> |

                    <a href="{{ url }}#disqus_thread">Comments</a> |

                    {{ relate:tags as="tags" }}
                    <span class="tags" itemprop="keywords">
                        {{ tags sort="title" }}
                            <a href="{{ url }}" title="View all posts tagged '{{ title }}'" rel="tag">{{ title }}</a>{{ if ! last }},{{ /if }}
                        {{ /tags }}
                    {{ /relate:tags }}

        {{ title | console_log }}
        {{ featured_image | console_log }}

          {{ if featured_image }}
            <div class="blog-content">
                <figure class="col-md-6 pull-right">
                    {{ assets:featured_image }}
                    <img class="img-responsive img-rounded" alt="{{ alt }}" src="{{ glide src="{id}" width="650" }}" itemprop="image">
                    {{ /assets:featured_image }}
            <div itemprop="description">
                        {{ content|markdown }}
            {{ else }}
            <div class="blog-content" itemprop="description">
                {{ content|markdown }}
            {{ /if }}

            <p class="blog-vitals">
                <a href="{{ url }}" class="readmore" title="Permalink for '{{ title }}'" itemprop="url">

The problem is with the featured_image variable. Hopefully someone has an answer. Might be a bug. :P

Thx in advance! :D


This comment has been minimized.

jeffwhitfield commented Aug 5, 2016

Just upgraded to v2.1.2. Unfortunately, the issue still present. :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment