Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello
I used Asset 7.x-1.x and CKEditor 4.4.7 and I've got JS error
Uncaught TypeError: Cannot read property 'getAttribute' of null
when I've pasted gallery into the WYSIWYG and have moved mouse over the gallery.
Please look at the screenshot
Comment | File | Size | Author |
---|---|---|---|
#1 | asset-fix-error-in-wysiwyg-2508745-1.patch | 471 bytes | eugene.ilyin |
Снимок-1.png | 74.07 KB | eugene.ilyin |
Comments
Comment #1
eugene.ilyin CreditAttribution: eugene.ilyin commentedThis situation occured due the fact that the function from CKEditor returned 'null' if this property is set.
Code in CKEditor doesn't check that this property contains false or true, because it takes it as text. It returns null if we have something in property "data-cke-editable". So we don't need this property for our wrapper in module asset.
I prepared the patch to solve this problem
Comment #2
IRuslan CreditAttribution: IRuslan commentedActually this attribute was required to avoid edition of of Asset's content, probably in newer version of CKEditor this problem should be solved without this attribute.
As i see for recent version it works, but we need someone to test it with older version of CKEditor first (as we have no separate branch for 4.3+ CKEditor versions).
Comment #3
eugene.ilyin CreditAttribution: eugene.ilyin commentedThis problem is still actual for ckeditor 4.5.3 (last version for now).
Comment #4
eugene.ilyin CreditAttribution: eugene.ilyin at DrupalJedi commentedI've checked this problem with ckeditor 4.3.1 and problem is reproduced.
Seems you mean issue #1905278. I've checked it too and my correction doesn't affect this issue.
So, I think we should commit this patch.
Comment #6
IRuslan CreditAttribution: IRuslan as a volunteer and at DrupalJedi commentedThanks for work. Pushed to dev branch.