statamic / eloquent-driver

Provides support for storing your Statamic data in a database, rather than flat files.
https://statamic.dev/tips/storing-content-in-a-database
MIT License
104 stars 74 forks source link

Paginated entry queries get their values overwritten #72

Closed cwhitby closed 1 year ago

cwhitby commented 1 year ago

Example code:

$paginator = Entry::query()
    ->where('collection', 'guest_reviews')
    ->paginate($args['first'] ?? 1, ['*'], 'testPageName', 3);

In the above example, I'm explicitly setting the requested page to 3, however, this is always overwritten back to 1. I think this is occurring in EntryQueryBuilder.php:70 where the page and pageName variables are being set back to page and 1 respectively.

Statamic version 3.3.43 Eloquent driver version 1.0.1

ryanmitchell commented 1 year ago

I'm so sorry, totally my fault. I've opened a PR to fix it here