Pagination error on changeStatus

While porting an old Kirby-2 site to Kirby 3.5 and working my way up in steps (currently 3.4.5) i am now stuck with a wierd error when trying to change the status of a page in the panel:

“Pagination page 30 does not exist, expected 1-1”
or
"Pagination page 30 does not exist, expected 1-2

depending on which page of the set (56 pages, num: zero) i try to set the status of. I tried fiddling around with the sorting, removed all old pages and created only one page - no matter what i do i keep getting the error. The same error occurs on direct children of the page, but everything works on grand-children and any other page in the site.

Can anyone point me in a direction to what may cause this issue? thx!

p.s.: here’s the site still running on good old Kirby 2.5.10: Art Initiatives Cologne | Initiativen

Could you post the blueprint please?

1 Like
title: Space
num: zero

columns:
  - width: 1/2
    sections:
      fields:
        type: fields
        fields:
          
          title:
            label: Title
            type: text
          name:
            label: Name
            type:  text
          subtitle:
            label: Untertitel
            type:  text
            width: 2/3
          since:
            label: Gründungsjahr
            type:  number
            min: 1970
            max: 9999
            width: 1/3
          text:
            label: Text
            type:  textarea
          telephone:
            label: Telefon
            type: tel
            width: 1/2
          email:
            label: E-Mail
            type: text
            width: 1/2
          website:
            label: Webseite
            type: text
            width: 1/2
          facebook:
            label: Facebook
            type: text
            width: 1/2
          instagram:
            label: Instagram
            type: url
            width: 1/2
          contact:
            label: Kontakt
            type: text
          adress:
            label: Adresse
            type: text
            width: 1/3
          postalcode:
            label: PLZ
            type: text
            width: 1/3
          city:
            label: Stadt
            type: text
            width: 1/3
          openinghours:
            label: Öffnungszeiten
            type: textarea
            width: 1/2
          directions:
            label: Anfahrt
            type: textarea
            width: 1/2
          location2:
            label: Location
            type: locator
            center:
              lat: 50.938829086582444
              lon: 6.9657288487183
            display:
              - lat
              - lon
              - address
              - number
              - city
            translate: false
          

  - width: 1/2
    sections:
      pages:
        type: pages
        headline: Ausstellungen
        templates: exhibition
        info: " {{ page.startdate }} "
        sortBy: startdate desc
        page: 30
      
      files: 
        type: files
        headline: "Dateien"

Your blueprints shouldn’t have a title field.

Is that the blueprint of a subpage that causes issues? Or does the pages section inside this blueprint cause the issue?

the hierarchy is:

initiative / space / exhibition / event

the blueprint above is ‘space.yml’ - one of the pages of which i cannot change the status of. the children of these pages (exhibition) do show the same error. the grandchildren however (event) work fine.

do you need to see the blueprint of the parent as well (initiatives)?

btw. thanks for pointing out the title, removing it didn’t fix the error though…

What strikes me as strange is the page: 30 property? How many pages are there?

If I’m not mistaken, that refers to the pagination page … and with 20 items per pagination page, you would need quite a few pages…

Yes, it would be helpful to see the other blueprints as well.

the error is thrown in Pagination.php:423 and if i turn validation off in Pagination.php:50

/**
* Whether validation of the pagination page
* is enabled; will throw Exceptions if true
*
* @var bool
*/
public static $validate = false;

it works. however i have no clue what the validation is for and i do not want to mess with the sources of kirby…

there are 56 pages, but i removed them all and started with only one page - same error, couldn’t change from draft to anything.

the 30 caught my attention, too, and i tried fiddling with the numbers (limit, page) of the parents’ pages section, but to no avail…

What if you remove that setting altogether? The number of items per pagination page is set via the limit property.

the parent: spaces.yml (initiatives)

title: Spaces

columns:
  - width: 1/1
    sections:
      pages:
        type: pages
        limit: 50
        page: 1
        info: "{{ page.adress }}"
        templates:
          - space

I hope we are not trying to hunt down an issue that has been fixed since 3.4.5, that’s always a problem when using old versions.

exhibition.yml, the child of the space with the same error

title: Exhibition

columns:
  - width: 1/2
    sections:
      fields:
        type: fields
        fields:
          subtitle:
            label: Untertitel
            type: text
          artist:
            label: Artist
            type: text
          text:
            label: Text
            type: textarea
          startdate:
            label: Startdatum
            type: date
            required: true
            width: 1/2
          enddate:
            label: Enddatum
            type: date
            required: true
            width: 1/2
          website:
            label: Website
            type: url
            width: 1/2
          facebook:
            label: Facebook
            type: url
            width: 1/2
          email:
            label: E-Mail
            type: email
          specialopeninghours:
            label: Besondere Öffnungszeiten
            type: textarea
          featured:
            label: Slideshow auf Homepage
            type: toggle

  - width: 1/2
    sections:
      pages:
        type: pages
        headline: Events
        templates: event
        info: " {{ page.datetime }} "
        sortBy: date desc
        page: 30
      
      files: 
        type: files
        headline: "Dateien"

Apart from this page setting, which I would remove entirely (at least for testing), I can’t really see anything wrong with these blueprints.

yeah, i thought so, too…but my thinking was that moving up in steps is the best way to make such a leap in version-jumps and 3.5 has another set of breaking changes that i was trying to avoid for now. but maybe i have to go that route…

do you have a clue what the validation is meant for? can it be turned off via config?

The $validate property checks if the pagination page exists, that’s why I thought the page: 30 was at fault.

BINGO! i removed this

page: 30

and it works! thank you so much!!! ahhhh…that made my day, the bug was haunting me for days now!
i hate how blueprints tend to become messy and you stop seeing the wood because of all the trees!

thank you for the late night support!

With the limit property you control the number of items per pagination page. page, however, sets on which pagination page the section should start, in case you don’t want to start on the first pagination page for whatever reason. But unless you have 900 pages (30 pages per pagination page), settings it to 30 will of course fail.

ahhh, thanks for making that clear! i couldn’t understand this as clearly from the docs where it says:

page (int) – Sets the default page for the pagination. This will overwrite default pagination.

this is understandable if you know the details, but very cryptic if you don’t!

That’s what I thought as well when I double-checked the documentation :wink:

haha…the more often you read it the more cryptic it becomes!

i think the naming of the options is also misleading here. i would think “limit” is the ultimate maximum of pages you can create or show, maybe “pagesize” would be better for what it does

“page” could be something like “startpage”?