Javascript errors in entity-form.js when retranslate checkbox does not exist

Created on 12 October 2023, about 1 year ago
Updated 25 October 2023, about 1 year ago

Problem/Motivation

This seems to be a regression of 📌 Refactor (if feasible) use of jquery is function to use vanillaJS Fixed . $checkbox is acessed, but unlike the check above, this one does not have a length check. This was discussed in the issue, but I think it was missed that it's not the same $checkbox and we're actually in an else case of that condition?

The error is:

TypeError: Cannot read properties of undefined (reading 'checked')
    at http://contrib.ddev.site/core/misc/entity-form.js?v=10.2.0-dev:62:38
    at $.fn.drupalGetSummary (http://contrib.ddev.site/core/misc/form.js?v=10.2.0-dev:39:20)
    at Drupal.verticalTab.updateSummary (http://contrib.ddev.site/core/misc/vertical-tabs.js?v=10.2.0-dev:216:38)
    at HTMLDetailsElement.<anonymous> (http://contrib.ddev.site/core/misc/vertical-tabs.js?v=10.2.0-dev:179:14)
    at HTMLDetailsElement.dispatch (http://contrib.ddev.site/core/assets/vendor/jquery/jquery.min.js?v=3.7.0:2:39997)
    at v.handle (http://contrib.ddev.site/core/assets/vendor/jquery/jquery.min.js?v=3.7.0:2:37968)
    at Object.trigger (http://contrib.ddev.site/core/assets/vendor/jquery/jquery.min.js?v=3.7.0:2:70063)
    at HTMLDetailsElement.<anonymous> (http://contrib.ddev.site/core/assets/vendor/jquery/jquery.min.js?v=3.7.0:2:70665)
    at Function.each (http://contrib.ddev.site/core/assets/vendor/jquery/jquery.min.js?v=3.7.0:2:3129)
    at ce.fn.init.each (http://contrib.ddev.site/core/assets/vendor/jquery/jquery.min.js?v=3.7.0:2:1594)

Test results here: https://git.drupalcode.org/project/paragraphs/-/pipelines/29297/test_rep...

Fail happens when running Drupal\Tests\paragraphs_library\FunctionalJavascript\ParagraphsLibraryItemEntityBrowserTest::testEntityBrowserWidget.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.2

Component
Javascript 

Last updated 3 days ago

Created by

🇨🇭Switzerland berdir Switzerland

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

Comments & Activities

Production build 0.71.5 2024