Problem/Motivation
Upon upgrading to 8.x-1.1, I am unable to use any instance of CKeditor due to this undefined method.
Error: Call to undefined method Drupal\\video_filter\\Plugin\\CKEditorPlugin\\VideoFilter::t() in Drupal\\video_filter\\Plugin\\CKEditorPlugin\\VideoFilter->getButtons() (line 56 of video_filter/src/Plugin/CKEditorPlugin/VideoFilter.php)
I believe this is due to the fix in #3134309: t() calls should be avoided in classes not implementing StringTranslationTrait in the class.
Steps to reproduce
Upgrade to 8.x-1.1 and attempt to edit some content that has a WYSIWYG field with CKeditor.
Proposed resolution
Implement StringTranslationTrait on VideoFilter.
Remaining tasks
Create issue branch and create commit.
User interface changes
N/A
API changes
N/A
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | Screen Shot 2022-09-22 at 11.04.47 AM.png | 359.72 KB | digitalfrontiersmedia |
| #8 | video_filter-use-stringtranslationtrait-3308405-8.patch | 747 bytes | doublejam |
Issue fork video_filter-3308405
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
pianomansam commentedIssue branch and Pull Request have been created. Ready for review.
Comment #4
adamevertsson commentedI'm not a developer, but when I implement this code change, the errors in watchdog disappear and I don't get en error, but I still can't edit the node. Now it just displays a white screen.
Comment #5
adamevertsson commentedI can also add that this bug makes it impossible to edit text formats in Drupal whereever Video Filter is activated.
Comment #6
baysaa commentedPatch from MR works for me. Fixes the exception and videos can be added via the Video Filter button on the WYSIWYG.
Comment #7
adamevertsson commentedYou are right @Baysaa. A new test works correctly. I don't know what went wrong the first time. 🤷
RTBC.
Comment #8
doublejam commentedUntil MR gets merged here is pianomansam's MR as patch.
Comment #9
indigoxela commentedI ran into this problem in an upgrade from core 9.3 to 9.4. (together with a module update to 8.x-1.1) I can confirm that the patch / mr fixes the problem. Otherwise the upgrade completely fails.
Comment #10
digitalfrontiersmedia@doublejam, no need to post a patch. The patch file is already listed with the MR:

Comment #14
megachrizI've added some test coverage for this bug. The test is inspired by \Drupal\Tests\ckeditor\Functional\CKEditorLoadingTest. I added a tests only branch for this to demonstrate the bug. I encountered some issues in creating a merge request for it and retried it with duplicating the tests only branch for which creating a merge request also failed. Just as I'm writing this, I see the merge request for the tests only branch finally getting created.
Let's see if the tests only branch fails tests and the branch with the fix passes.
Comment #16
damienmckennaComment #18
damienmckennaCommitted. Thank you.