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

Failing core/config/themedui* tests #1278

Closed
Comandeer opened this issue Nov 29, 2017 · 3 comments · Fixed by #1286
Closed

Failing core/config/themedui* tests #1278

Comandeer opened this issue Nov 29, 2017 · 3 comments · Fixed by #1286
Assignees
Labels
status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:failingtest A failing test.

Comments

@Comandeer
Copy link
Member

Are you reporting a feature request or a bug?

Failing tests

Provide detailed reproduction steps (if any)

tests/core/config/themedui and tests/core/config/themedui2 throw:

Uncaught TypeError: Cannot read property 'registered' of undefined
    at b.toAllowedContentRules (ckeditor.js:1270)
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.filter.allow (ckeditor.js:213)
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.filter.allow (ckeditor.js:214)
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.filter.addFeature (ckeditor.js:218)
    at addFeature (ckeditor.js:265)
    at f (ckeditor.js:649)
    at b (ckeditor.js:648)
    at a (ckeditor.js:650)
    at a.<anonymous> (ckeditor.js:655)
    at a.e (ckeditor.js:10)

Other details

  • CKEditor version: 4.80 (built version with uploadimage plugin enabled)
@Comandeer Comandeer added the type:failingtest A failing test. label Nov 29, 2017
@mlewand mlewand added the target:major Any docs related issue that should be merged into a major branch. label Nov 29, 2017
@f1ames f1ames self-assigned this Nov 30, 2017
@f1ames
Copy link
Contributor

f1ames commented Nov 30, 2017

Seems like there is some race condition, or widget plugin is not loaded for some reason. This error is reproducible on sample (build version) with config (same as in test):

config.plugins = 'about,basicstyles,bidi,blockquote,clipboard,colorbutton,colordialog,div,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,image,iframe,indent,justify,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,resize,toolbar,save,selectall,showblocks,showborders,smiley,sourcearea,specialchar,stylescombo,table,templates,undo,wysiwygarea';

@msamsel msamsel added the status:confirmed An issue confirmed by the development team. label Nov 30, 2017
@f1ames
Copy link
Contributor

f1ames commented Nov 30, 2017

Looks like it is caused by stylescombo trying to add widget related styles to ACF:

image

however, the widget plugin is not present. Removing stylescombo from config or adding uploadimage makes everything is loading fine 🤔

@f1ames
Copy link
Contributor

f1ames commented Nov 30, 2017

So now, when uploadimage is included by default also its dependencies are included in ckeditor.js (widget plugin).
Even though these two plugins are not used by the editor (considered above config), widget plugin by default registers its custom styles handler - https://github.com/ckeditor/ckeditor-dev/blob/major/plugins/widget/plugin.js?utf8=%E2%9C%93#L3591-L3608. And so when the stylescombo processes the styles from style.js, the custom styles handler for widget type exists and gets executed. However, as there is no plugins widget initiated it fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:failingtest A failing test.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants