Problem/Motivation

White screen of death when using a key for a brand new project with no assets in it

Steps to reproduce

When setting up this module I pointed it at an empty Loco project to test. This causes a division by zero error in the template.

{% set percent = (locale.progress.translated / variables.assets|length * 100)|number_format(2, '.') %}

Proposed resolution

Wrap the twig snippet in an if statement with proposed action to add some assets..

Remaining tasks

Code. Test

User interface changes

Wording to explain empty project.

API changes

None

Data model changes

None

CommentFileSizeAuthor
#4 3537439-04.patch2.24 KBwengerk

Comments

lolcode created an issue. See original summary.

wengerk’s picture

wengerk’s picture

Status: Active » Needs review
wengerk’s picture

StatusFileSize
new2.24 KB

Here's the patch

wengerk’s picture

Status: Needs review » Fixed

Merged in dev branch 3.0.x

  • wengerk committed 2a889499 on 3.0.x
    fix Issue #3537439 by lolcode, wengerk: Division by zero when using a...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.