Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: DivisionByZeroError in UpdateElementSlugsAndUris job #16787

Open
joostwaaijer opened this issue Feb 27, 2025 · 0 comments
Open

[4.x]: DivisionByZeroError in UpdateElementSlugsAndUris job #16787

joostwaaijer opened this issue Feb 27, 2025 · 0 comments

Comments

@joostwaaijer
Copy link

What happened?

Description

We are experiencing an issue in one of our site where the UpdateElementSlugsAndUris is reporting a DivisionByZeroError. The issue is happening on this line:
$this->setProgress($queue, $this->_totalProcessed++ / $this->_totalToProcess);

Looks like $this->_totalToProcess can sometimes be 0 while in the foreach (Db::each($query) as $element) { loop

Steps to reproduce

  1. Run the UpdateElementSlugsAndUris job
  2. Randomly it can crash by a DivisionByZeroError

Craft CMS version

4.13.8

PHP version

8.3.16

Operating system and version

No response

Database type and version

PostgreSQL 16.6

Image driver and version

No response

Installed plugins and versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant