Javascript errors due to incorrect capitalisation of TRUE and FALSE in term_reference_tree.js

Created on 14 March 2023, almost 2 years ago
Updated 31 May 2023, over 1 year ago

Problem/Motivation

Over in #3337922 term_reference_tree.js was incorrectly changed as a result of issues highlighted by phpcs - php coding standards checker. Javascript files are not supported by Coder, and thus the errors should have been ignored.

The key changes that have causes errors are the changing of case of the boolean 'false' and 'true' to 'FALSE' and 'TRUE'. Javascript is case-sensitive and FALSE and TRUE do not exist.

We noticed this after deploying the term_reference_tree update to our prouduction site and then saw many many instances of this error logged in Sentry, our log monitoring software:

ReferenceError

FALSE is not defined
checkMaxChoices(tree, FALSE);

Proposed resolution

Revert the boolean case changes.

🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom nicrodgers Monmouthshire, UK

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

Comments & Activities

Production build 0.71.5 2024