- Issue created by @finex
- 🇺🇸United States jmouse888
I can confirm the same error after Drupal 9.5.6 upgrade. (TypeError.... formView is null)
- 🇺🇸United States mark_fullmer Tucson
The update to CKEditor5 that caused the issue, introduced in 9.5.6 and 10.0.6, has been reverted in https://www.drupal.org/project/drupal/releases/9.5.7 → and https://www.drupal.org/project/drupal/releases/10.0.7 →
This issue should remain open for compatibility with 10.1.x, which retains the CKEditor update.
- 🇺🇸United States mark_fullmer Tucson
Note the proximate trigger is
const linkFormView = this.editor.plugins.get( 'LinkUI' ).formView;
, https://git.drupalcode.org/project/editor_advanced_link/-/blob/2.x/js/ck... , which returns a null value. - 🇺🇸United States jmouse888
Confirmed Editor Advanced Link 2.1.1 is working with Drupal 9.5.7.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
I spent hours on this over at #3317769.
See #3317769-33: Drastically improve Drupal's default linking experience in text fields → and https://git.drupalcode.org/project/drupal/-/merge_requests/2909/diffs?co... for the exact root cause + solution. That solution also removes one hack:
+++ b/js/ckeditor5_plugins/editorAdvancedLink/src/editoradvancedlinkui.js @@ -0,0 +1,93 @@ + // This is a hack. Thic could be potentially improved by detecting when the + // form is added by checking the collection of the ContextualBalloon plugin. + editor.plugins.get( 'ContextualBalloon' )._rotatorView.content.on( 'add', ( evt, view ) => {
- 🇯🇴Jordan Rajab Natshah Jordan
Facing the same issue with Drupal 10.1.0-alpha1
editor5.js?rtzgxi:472 TypeError: Cannot read properties of null (reading 'extendTemplate') at s._changeFormToVertical (editorAdvancedLink.js?v=10.1.0-alpha1:1:3968) at s.init (editorAdvancedLink.js?v=10.1.0-alpha1:1:3734)
- First commit to issue fork.
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - @bbombachini opened merge request.
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - 🇨🇦Canada bbombachini London, ON
Got this started but it needs work and I don't have a lot of experience with ckeditor 5 changes.
- Status changed to Needs work
over 1 year ago 10:52pm 16 May 2023 - 🇩🇪Germany Anybody Porta Westfalica
We're facing the same issue with Drupal 10.1.0-beta1
- 🇩🇪Germany a.dmitriiev
I have tried the code from MR on Drupal 10.1.0-beta1 and it indeed fixed fatal error. Unfortunately for extra fields only "Open in new tab" is displayed and not others.
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Status changed to Needs review
over 1 year ago 1:08pm 24 May 2023 - 🇩🇪Germany a.dmitriiev
I think that the issue is now fixed in the MR. I moved everything inside the event listener for
set:visibleView
and it started working properly. Please review. - Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - 🇩🇪Germany breidert
I tested the patch #16 and it works for the properties Title, CSS classes, Open in new window, and in combination with Linkit module → .
- 🇳🇱Netherlands deneus18
In my case when I add the link button to CKEditor then the editor is not displayed.
After adding #16 everything seems to work as expected. - 🇧🇪Belgium mgstables
After applying patch #16 the ckeditor5 still won't load. The Console shows the following error message:
TypeError: this.editor.plugins.get(...).formView is null _changeFormToVertical http://localhost:8080/modules/contrib/editor_advanced_link/js/build/editorAdvancedLink.js?v=10.1.0-beta1:1 init http://localhost:8080/modules/contrib/editor_advanced_link/js/build/editorAdvancedLink.js?v=10.1.0-beta1:1 ckeditor5.js:472:19 attach http://localhost:8080/core/modules/ckeditor5/js/ckeditor5.js?rvm49a:472
Drupal 10.1.0-beta1
Advanced Link 2.1.1
PHP 8.1.6 - 🇬🇧United Kingdom robcarr Perthshire, Scotland
The patch at #16 worked for me: D10.1-beta1; PHP 8.1.6; Adv link 2.1.1; Chrome 113.0.5672.126
Note: I cleared Drupal cache and the browser cache
- 🇧🇪Belgium mgstables
Yes, clearing the browser cache made it work. Thanks @robcarr.
Now patch #16 works for me too. - Status changed to RTBC
over 1 year ago 2:55pm 2 June 2023 - Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - 🇺🇸United States dwisnousky
adding as physical patch to keep our codebase as safe as possible. Thank you for the fix, fam!
- 🇩🇪Germany a.dmitriiev
How is patch from #23 is different from patch in #16?
- 🇩🇪Germany Anybody Porta Westfalica
- 🇫🇷France zenimagine
Hi, impossible to apply the patch on drupal 10.1 would you have a solution? THANKS
- Installing drupal/core (10.1.0): Extracting archive - Applying patches for drupal/core https://www.drupal.org/files/issues/2023-05-24/3350254-ckeditor-5-36-compatibility-16.patch (CKEditor 5 ^36 compatibility — necessary for Drupal 10.1.x) Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2023-05-24/3350254-ckeditor-5-36-compatibility-16.patch
- Status changed to Needs work
over 1 year ago 3:57pm 22 June 2023 - 🇫🇷France zenimagine
Sorry, error on my part, because I applied the patch to the kernel. I have now correctly applied the patch to the module, but it does not work. I have errors in the console and ckeditor does not load.
"patches": { "drupal/editor_advanced_link": { "CKEditor 5 ^36 compatibility — necessary for Drupal 10.1.x": "https://www.drupal.org/files/issues/2023-05-24/3350254-ckeditor-5-36-compatibility-16.patch" } },
- Status changed to RTBC
over 1 year ago 4:08pm 22 June 2023 - 🇫🇷France zenimagine
I have applied the patch to the module and cleaned the cacahe but I have this error in the console and ckeditor does not load:
TypeError: this.editor.plugins.get(...).formView is null _changeFormToVertical https://www.example.com/modules/contrib/editor_advanced_link/js/build/editorAdvancedLink.js?v=10.1.0:1 init https://www.example.com/modules/contrib/editor_advanced_link/js/build/editorAdvancedLink.js?v=10.1.0:1
Patch works for me. Thanks for this, thought I was in real trouble when I tested the Drupal update today.
- 🇩🇪Germany a.dmitriiev
@Anybody the patch in #16 was created from MR, so they should be in sync.
- 🇩🇪Germany a.dmitriiev
@zenimagine it might be also the cache in the browser. Try to clear browser cache.
- 🇺🇸United States bkline Virginia
Confirming patch #16 works on D10.1.0 with linkit module.
- 🇫🇷France zenimagine
Thanks, it works. I had cleared cache in drupal but not in browser
- Status changed to Needs work
over 1 year ago 11:58am 26 June 2023 -
a.dmitriiev →
authored 9e7b116c on 2.x
Issue #3350254 by bbombachini, a.dmitriiev, dwisnousky, FiNeX,...
-
a.dmitriiev →
authored 9e7b116c on 2.x
- Status changed to Fixed
over 1 year ago 12:03pm 26 June 2023 - 🇫🇷France duaelfr Montpellier, France
Thank you all!
I reworked the patch on top of the 2.x branch and fixed the last issue. - Status changed to Needs work
over 1 year ago 3:49pm 6 July 2023 - 🇧🇷Brazil jkamizato
I've moved to "need to work" because MR and patches can't be applied.
- @jkamizato opened merge request.
- 🇧🇷Brazil jkamizato
Guys, I've created a new branch
3350254-ckeditor-5-36-2
and I've applied manually the patch #23. I'm uploading the new patch and I've updated the code. - Status changed to Fixed
over 1 year ago 3:55pm 7 July 2023 - 🇩🇪Germany a.dmitriiev
jkamizato you can't apply the patch, because it is already merged to the module and the new version was released.
- Status changed to Fixed
over 1 year ago 3:24pm 20 July 2023 - 🇧🇷Brazil carolpettirossi Campinas - SP
Moving to Closed Fixed as it's been already merged and available in the release
- 🇦🇹Austria agoradesign
fyi, "Fixed" status gets moved to "Closed (fixed)" automatically after 14(?) days :)