Skip to content

include_cached preventing Disqus comments from displaying #1905

Closed
@paulfioravanti

Description

Environment

Expected behavior

Disqus comments display underneath a post when site.comments.provider is "disqus".

Steps to reproduce the behavior

No specific steps to re-produce as the comments were working previously at some point in the past, and then one day I noticed they were not displaying anymore. However, I suspect that #1874 could be a potential cause (see further information below for reasoning).

The log of bundle exec jekyll build --trace --verbose was quite long, so I put it in this gist.

Other

Here is a screenshot of running JEKYLL_ENV=production bundle exec jekyll liveserve on my local machine with the current version of Minimal Mistakes, where you can see that comments are not displaying:

current_situation

Here is a screenshot of running JEKYLL_ENV=production bundle exec jekyll liveserve on my local machine after making the following changes:

  1. Copying the content of _layouts/default.html to a local _layouts/default.html file, and changing
    {% include_cached scripts.html %}

    from {% include_cached scripts.html %} to {% include scripts.html %}
  2. Copying the content of _includes/scripts.html to a local _includes/scripts.html file, and changing
    {% include_cached /comments-providers/scripts.html %}
    from {% include_cached /comments-providers/scripts.html %} to {% include /comments-providers/scripts.html %}

with-include-cached-removed

Making these changes does output some Javascript errors in the console, unfortunately:

js-errors

However, since the comments are now displaying, I see the Javascript errors as the lesser of two issues. Hence, I have deployed out this change to my site on Github Pages, and can confirm that comments are displaying there as expected.

I haven't made a PR with the changes I've outlined since it brings up JS issues and I cannot confirm that the issue exists for other comment providers, but am happy to provide any further information I may have neglected to put in this issue.

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions