Update term depths tag errors when there are no terms

Created on 4 October 2024, 14 days ago

Problem/Motivation

If you have a vocabulary with no terms, going to update term depths (admin/structure/taxonomy/manage/[vocabulary name]/taxonomy_term_depth_update), the following error is thrown:

DivisionByZeroError: Division by zero in Drupal\taxonomy_term_depth\Form\DepthUpdateForm->buildForm() (line 45 of profiles/uw_base_profile/modules/contrib/taxonomy_term_depth/src/Form/DepthUpdateForm.php).

(Yes, there is no reason to update term depths when you have no terms, but the page should say that instead of erroring out.)

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada kpaxman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024