URL field missing when editing a link in CKEditor 5 with Drupal 10.5 and PHP 8.3

Created on 20 June 2025, 4 days ago

Hi,

Problem/Motivation

After upgrading to Drupal 10.5 with PHP 8.3, an issue occurs with formatted text fields using CKEditor 5 and the Link plugin in toolbar.

When a link is first added via the editor, everything works as expected. However, if you click on the link again and choose to edit it, the URL field is missing in the modal dialog. This makes it impossible to update the link via the user interface.

Important: If you switch to source code view, the href attribute is present and correctly set, meaning the data is intact the issue is with the rendering of the edit interface.

A JavaScript error is also thrown in the browser console:

Uncaught CKEditorError: Cannot read properties of undefined (reading '_items')
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-Cannot read properties of undefined (reading '_items')
    at h._moveTargetDecoratorToAdvancedGroup (editorAdvancedLink.js?v=10.5.0:1:11611)
    at C.<anonymous> (editorAdvancedLink.js?v=10.5.0:1:10104)
    at C.fire (ckeditor5-dll.js?v=45.2.0:5:639290)
    at C.set [as visibleView] (ckeditor5-dll.js?v=45.2.0:5:641653)
    at C._showView (ckeditor5-dll.js?v=45.2.0:5:607964)
    at C.add (ckeditor5-dll.js?v=45.2.0:5:604887)
    at le._addFormView (link.js?v=45.2.0:5:44726)
    at k.<anonymous> (link.js?v=45.2.0:5:42602)
    at k.fire (ckeditor5-dll.js?v=45.2.0:5:639290)
    at d.<anonymous> (ckeditor5-dll.js?v=45.2.0:5:549873)

Steps to reproduce

  1. Add a Long text with summary field using CKEditor 5.
  2. Enable the Link plugin for the text format in use.
  3. Edit a piece of content, select some text, click the link icon, enter a URL, and save.
  4. Click the linked text again and press the edit link button
  5. Observe that the URL field is missing from the dialog. Switch to source code view and confirm the href value is present.

.

Proposed resolution

Expected behavior:
When editing an existing link, the URL field should appear and be prefilled with the original value.

Actual behavior:

The URL field is missing in the dialog, and a JavaScript error is thrown. The href value still exists in the source HTML.

ℹ️ I'm attaching a video capture to help better illustrate the issue.

πŸ› Bug report
Status

Active

Version

10.5 ✨

Component

ckeditor5.module

Created by

πŸ‡·πŸ‡ͺRΓ©union Martygraphie Saint-Denis (RΓ©union)

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

Comments & Activities

Production build 0.71.5 2024