I cannot paginate from the homepage

I am new to Kirby and really like it so far. Only trouble I have had is that pagination does not work from the root URL.
When I have my news/blog page on:
then pagination works and produces the URLs:

When the news blog is the home page, which my client wants, the pagination URL is like this:
which just redirects to:

Any tips?
Help appreciated!

Which Kirby version are you using? Are the articles children of the home page or have you used the c::set('home', 'somepage') option? Do you use any routes?

I am not using any routes and I am not setting c::set(‘home’, ‘somepage’).
The homepage in the folder 1-home.
The homepage is of template ‘news’ which has a controller called ‘news’.
Everything works fine when I change the page folder to ‘2-news’ so that it is not the homepage and has the URL rooturl.com/news.
I am using the latest Kirby version and have multilanguage enabled:
c::set(‘language.detect’, true);
c::set(‘languages’, array(
‘code’ => ‘en’,
‘name’ => ‘English’,
‘default’ => true,
‘locale’ => ‘en_US’,
‘url’ => ‘/’,
‘code’ => ‘fr’,
‘name’ => ‘Français’,
‘locale’ => ‘fr_FR’,
‘url’ => ‘/fr’,
‘code’ => ‘de’,
‘name’ => ‘Deutsch’,
‘locale’ => ‘de_DE’,
‘url’ => ‘/de’,
‘code’ => ‘es’,
‘name’ => ‘Español’,
‘locale’ => ‘es_ES’,
‘url’ => ‘/es’,

Though I am not using more than one language file, they are all en.txt.

Thanks for the help!

Looks like this happens when language.detect is enabled, this is definitely a bug.

I have created an issue on GitHub.

Thanks for your feedback!
I am using kirby-shopkit which requires multilanguage but I did notice that the url baseurl.com/news/page:2 does work so I can interpolate /new into the next page URL in the meantime.


If you only use one language, you can remove or comment out this line:

c::set('language.detect', true);

This bug is now fixed on the develop branch for the next release (2.4.1). You can already test if if you want. :slight_smile:

1 Like