- Issue created by @emulamba
- Status changed to Needs work
8 months ago 11:06am 8 March 2024 The Needs Review Queue Bot โ tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request โ . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- Status changed to Postponed: needs info
8 months ago 1:11pm 8 March 2024 This does not meet the requirements of a critical issue.
views_bulk_operations is in the stack trace. Is this reproducible without views_bulk_operations?
- ๐ฎ๐ณIndia saurabh rawat
saurabh rawat โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia saurabh rawat
saurabh rawat โ changed the visibility of the branch 3426603-divisionbyzeroerror-division-by to hidden.
- ๐ฎ๐ณIndia saurabh rawat
saurabh rawat โ changed the visibility of the branch 3426603-divisionbyzeroerror-pager to hidden.
- Merge request !7152adding condition for pager in case limit is zero โ (Open) created by saurabh rawat
- Status changed to Needs review
8 months ago 8:25am 22 March 2024 - Status changed to Postponed: needs info
8 months ago 1:25pm 22 March 2024 - ๐บ๐ธUnited States smustgrave
Was previously tagged for steps to reproduce which are still needed.
What research was done? How come that value is getting set to 0? Putting a check like this could mask a larger problem.
- ๐บ๐ธUnited States fizcs3 Omaha, Nebraska; USA
I've just come across a similar issue...
For me, was in Layout Builder, "Add Block" of a predefined View display block, and accidentally entered "00" (instead of "99") into the "items per block" field and clicked the Update button. Nothing happened and it kept me on the Configure Block modal. Turns out it threw a similar error to the system log when I looked there, which my trace starts with:DivisionByZeroError: Division by zero in Drupal\Core\Pager\Pager->setTotalPages() (line 78 of /var/www/html/web/core/lib/Drupal/Core/Pager/Pager.php) #0 /var/www/html/web/core/lib/Drupal/Core/Pager/Pager.php(51): Drupal\Core\Pager\Pager->setTotalPages('5', '00') #1 /var/www/html/web/core/lib/Drupal/Core/Pager/PagerManager.php(56): Drupal\Core\Pager\Pager->__construct('5', '00', 0) #2 /var/www/html/web/core/modules/views/src/Plugin/views/pager/SqlBase.php(333): Drupal\Core\Pager\PagerManager->createPager('5', '00', 0) #3 /var/www/html/web/core/modules/views/src/Plugin/views/query/Sql.php(1551): Drupal\views\Plugin\views\pager\SqlBase->updatePageInfo() #4 /var/www/html/web/core/modules/views/src/ViewExecutable.php(1441): Drupal\views\Plugin\views\query\Sql->execute(Object(Drupal\views\ViewExecutable)) #5 /var/www/html/web/core/modules/views/src/ViewExecutable.php(1469): Drupal\views\ViewExecutable->execute(NULL) ...
The above patch makes sense to me, which contains a very reasonable validation of the $limit variable to assure it isn't zero.
I applied the patch to D10.2.5 and fixes my issue, of user error causing an unnecessarily bad system error.