UniNextPrev plugin seems to cause: Warning: array_multisort(): Array sizes are inconsistent in /.../kirby/toolkit/lib/collection.php on line 339
I’m the author, but obviously I’m a bit lost on this error? I think it is Kirby, but I can’t see why my code is causing the error there?
Anyone any idea?
Okay, so I played around with UniNextPrev, but ultimately found a simpler solution for my site which did the same thing, and I’m getting the same error here. This is the code I am using:
EDIT: In addition, it happens for the “previous post” when on the first post, but then on the next post when your at the second to last post, then back to the previous post… so, whatever is causing it, is alternating?
Hi @bastianallgeier, I just updated my local Kirby install with the prev/next fix from the develop branch, but although I don’t get the ‘array_multisort’ warning anymore, I do get array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } warnings on the page where I have $page->hasNextVisible() or $page->nextVisible() checks (including in the pagination). Any ideas?
Would it be possible to get a version of your site to test this some more? I wrote unit tests around it and they all pass, so I’m a bit lost why this is happening on your site.