CKEditorError: t.getFirstPosition() is null when uswds grid button enabled on a text format

Created on 16 July 2024, 4 months ago

Problem/Motivation

When the USWDS Grid button is added to a text format and you go to edit or create a node, the input field is very narrow and the following JS error appears in the console:

CKEditorError: t.getFirstPosition() is null
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-t.getFirstPosition() is null
    i http://blankdrup.ddev.site/modules/contrib/uswds_ckeditor_integration/js/build/uswds_grid.js?sgqa7i:1
    getRelatedElement http://blankdrup.ddev.site/modules/contrib/uswds_ckeditor_integration/js/build/uswds_grid.js?sgqa7i:1
    _updateToolbarsVisibility http://blankdrup.ddev.site/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=41.3.1:5
    init http://blankdrup.ddev.site/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=41.3.1:5
    fire http://blankdrup.ddev.site/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=41.3.1:5
    update http://blankdrup.ddev.site/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=41.3.1:5
    fire http://blankdrup.ddev.site/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=41.3.1:5
    de http://blankdrup.ddev.site/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=41.3.1:5
js_fTyiuGr1dvBrlsYBk14bN4RLiGHKLZzuhNCGqHHvaCo.js:23:5443

Steps to reproduce

This happens on a blank drupal install and on our existing site.

  1. Enable USWDS theme
  2. Install and enable USWDS CKEditor Integration
  3. Add uswds grid button to a text format and save
  4. Edit or create a node
  5. Switch to or use text format with USWDS grid button
  6. See error in the console
  7. Switch back to another text format and see that it has added a new input field and changed the height.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Purcell

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

Comments & Activities

Production build 0.71.5 2024