You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using CakePHP 3.6.7, the pagination function is not working. It always seems to think that the total row count for a query is 1, therefore the pagination component sets page count to 1.
I've traced this issue down to the fact that that CakePHP pagination module has the following code:
many many thanks @minlite i was facing this issue, than somehow found your answer.
i am also facing buildrule check issue
below function is not working , can you help me? public function buildRules(RulesChecker $rules) { $rules->add($rules->isUnique(['email'])); return $rules; } }
also pagination function is not working correctly while applying filter. like i searching a name 'raj' and found 1 record than also pagination showing wrong pages and next,previous buttons
When using CakePHP 3.6.7, the pagination function is not working. It always seems to think that the total row count for a query is 1, therefore the pagination component sets page count to 1.
I've traced this issue down to the fact that that CakePHP pagination module has the following code:
cakephp/src/Datasource/Paginator.php (188):
Here, query is an instance of MongoQuery. The
$count
seems to be always set to 1, no matter how many records there are in the database.I was able to fix this temporarily by changing the following in src/ORM/Table.php:
(Notice the addition of
$queryWoOptions
,$mongoCursorWoOptions
, and$resultsWoOptions
)I will try to track this down more, but just wanted to open an issue to see if the developers might have an idea about this issue.
Thanks!
The text was updated successfully, but these errors were encountered: