I am facing issue with Jekyll 4.2 and Paginate v2 3.0

Hello Guys,

can anyone help me fix an issue I am running into.

All of my links works perfectly fine when I upgraded from 3.9 to 4.2
but my blog page inside blogs/index.html doesn’t display posts .
my gem file looks like following

source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem 'jekyll', '~>4.2.0'
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5.1"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed"
  gem "jekyll-paginate-v2" , '3.0.0'
  gem 'jekyll-tagging'
  gem 'jekyll-archives'
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
  gem "tzinfo", "~> 1.2"
  gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform?

# Webrick for jekyll 4.2
gem "webrick"

#gem "kramdown", "<=2.0.0"

gem "kramdown-parser-gfm", "~> 1.1"

gem 'eventmachine', '1.2.7', git: 'https://github.com/eventmachine/eventmachine.git', tag: 'v1.2.7'

post loop

{% if post.post_image %}
<figure class="overlay overlay1 rounded mb-30">
	<a href="{{post.url}}"><img class="post-thumb" src="{{post.post_image}}" alt="{{post.title}}"/></a>
  <figcaption>
    <h5 class="from-top mb-0">Read More</h5>
  </figcaption>
</figure>
{% endif %}
{% if post.categories %}
 <div class="category">
 	 <a href="/category/{{post.categories[0] | slugify}}" class="badge badge-pill bg-purple">{{post.categories[0]}}</a>
 </div>
{% endif %}
<h2 class="post-title"><a href="{{post.url}}">{{post.title}}</a></h2>
<div class="post-content">
  <p>{{post.excerpt | strip_html | truncatewords: 25}}</p>
</div>
<!-- /.post-content -->
<div class="meta mb-0">
	{% if post.date %}
	<span class="date"><i class="jam jam-clock"></i>{{post.date | date_to_string}}</span>
	{% endif %}
	<span class="comments"><i class="jam jam-user"></i><a href="/authors/{{post.author | slugify}}"> {{post.author}}</a></span>
</div>

pagination page

<div class="space30 d-block d-md-none"></div>
<div class="pagination text-center">
    {% if paginator.total_pages > 1 %}
    <ul>
      {% if paginator.previous_page %}
      <li>
        <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">
          <i class="jam jam-arrow-left"></i> Previous
        </a>
      </li>
      {% endif %}
      {% if paginator.next_page %}
      <li>
        <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">
         Next <i class="jam jam-arrow-right"></i>
        </a>
      </li>
      {% endif %}
    </ul>
    {% endif %}
</div>
<!-- /.pagination -->

index page

---
layout: page
title: "Classic Grid Blog"
sub_title: "Aenean lacinia bibendum nulla sed consectetur Test"
header_image: "/assets/images/art/bg31.jpg"
white_menu: true
pagination:
  enabled: true
  per_page: 9
permalink: "/blogs/index"
---

<div class="wrapper light-wrapper">
<div class="container inner">
<div class="blog grid grid-view">
  <div class="row isotope">
  {% for post in paginator.posts %}
    <div class="item post grid-sizer col-md-6 col-lg-4">
      {% include post_loop.html %}
    </div>
    <!-- /.post --> 
   {% endfor %}
  </div>
  <!-- /.row -->
</div>
<!-- /.blog -->
{% include pagination.html %}
</div>
<!-- /.container -->
</div>

the posts are not rendered in output at all, they are blank. all other pages are working perfectly. Also, when I dobundle exec jekyll serve i don’t get to see any error and all posts show following message

Pagination: ----------------------------
        Pagination: Page: blogs/index.html
        Pagination:  Active configuration
        Pagination:   Enabled:          true
        Pagination:   Items per page:   9
        Pagination:   Permalink:        /page/:num/
        Pagination:   Title:            :title - page :num
        Pagination:   Limit:            0
        Pagination:   Sort by:          date
        Pagination:   Sort reverse:     true
        Pagination:  Active Filters
        Pagination:   Collection:       posts
        Pagination:   Offset:           0
        Pagination:   Category:         [Not set]
        Pagination:   Tag:
        Pagination:   Locale:
        Pagination:  Filtering by: Category   16 => 16
        Pagination:  Filtering by: Tag        16 => 16
        Pagination:  Filtering by: Locale     16 => 16
        Pagination: Rolling through the date fields for all documents
        Pagination: Complete, processed 8 pagination page(s)
       Jekyll Feed: Generating feed for posts

my posts frontmatter

---
layout: post
title: "The Best Moments in Venice"
date: 2021-09-15 20:37:13 +0600
author: "me"
post_image: "/assets/images/art/tb1.jpg"
badge_color: "bg-purple"
categories: [places]
slider_post: true
---

Does it work properly with Jekyll 4.1.1 and Jekyll 4.0.1?
If yes, let us know.
Otherwise, its probably an incompatibility across major version changes. (Jekyll 3.x and Jekyll 4.x)

A

As soon as I change from 3.9 to 4.0 and above, it just stopped working.

I can’t seem to find a way to fix it.
Other pages are working fine, the loop of post in sites.posts work fine ,but post in paginator.posts doesn’t seem to work atall.

Anyone facing this same issue?

did you try to remove the permalink of the index page? maybe this is overwritten the paginator options

Thanks for replying. Yes I did tried removing the permalinks but nothing changed. It was all fine till 3.9 as soon as I switched to 4.0 and above it broke.

other thing you can try is to put all the paginator option in _config.yml instead of the page, of curse the only variable you need to add to the page is:

pagination:
  enabled: true

I will try today and update.