Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor crashes after inserting two mediaEmbed items to the toolbar #6333

Closed
Mgsy opened this issue Feb 26, 2020 · 3 comments · Fixed by #6736
Closed

Editor crashes after inserting two mediaEmbed items to the toolbar #6333

Mgsy opened this issue Feb 26, 2020 · 3 comments · Fixed by #6736
Assignees
Labels
intro Good first ticket. package:media-embed type:bug This issue reports a buggy (incorrect) behavior.

Comments

@Mgsy
Copy link
Member

Mgsy commented Feb 26, 2020

📝 Provide detailed reproduction steps (if any)

  1. Open the editor with two mediaEmbed items in the toolbar (or 1 in the main toolbar + 1 in the balloon toolbar).

✔️ Expected result

Items are added properly.

❌ Actual result

The editor crashes.

📃 Other details

Error

article.js:50 CKEditorError: observable-bind-rebind: Cannot bind the same property more than once. Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-observable-bind-rebind
    at http://localhost:8125/ckeditor5/tests/manual/article.js:116888:11
    at Array.forEach (<anonymous>)
    at LabeledInputView.bind (http://localhost:8125/ckeditor5/tests/manual/article.js:116881:18)
    at MediaEmbedUI._setUpForm (http://localhost:8125/ckeditor5/tests/manual/article.js:91774:27)
    at Object.callback (http://localhost:8125/ckeditor5/tests/manual/article.js:91731:18)
    at ComponentFactory.create (http://localhost:8125/ckeditor5/tests/manual/article.js:100589:56)
    at http://localhost:8125/ckeditor5/tests/manual/article.js:108003:40
    at Array.map (<anonymous>)
    at ToolbarView.fillFromConfig (http://localhost:8125/ckeditor5/tests/manual/article.js:107999:16)
    at ClassicEditorUI._initToolbar (http://localhost:8125/ckeditor5/tests/manual/article.js:39720:16)

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@Mgsy Mgsy added type:bug This issue reports a buggy (incorrect) behavior. status:confirmed labels Feb 26, 2020
@Reinmar
Copy link
Member

Reinmar commented Feb 26, 2020

I guess it's a big issue if you want to have media embed buttons in the main toolbar and the block toolbar?

@Mgsy
Copy link
Member Author

Mgsy commented Feb 26, 2020

I guess it's a big issue if you want to have media embed buttons in the main toolbar and the block toolbar?

That's correct.

@tomalec
Copy link
Contributor

tomalec commented Apr 21, 2020

The fix is ready at ckeditor/ckeditor5-media-embed#98

@Reinmar Reinmar modified the milestones: iteration 31, iteration 32 Apr 24, 2020
Reinmar added a commit that referenced this issue May 5, 2020
Fix (media-embed): Made it possible to use the `mediaEmbed` button more than once (in more than one toolbar. Closes #6333.

MINOR BREAKING CHANGE: `MediaEmbedUI#form` was removed from the API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intro Good first ticket. package:media-embed type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
4 participants