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 with nested tables #1260

Closed
ckotzbauer opened this issue Sep 24, 2018 · 6 comments
Closed

Editor crashes with nested tables #1260

ckotzbauer opened this issue Sep 24, 2018 · 6 comments
Labels
type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@ckotzbauer
Copy link

Is this a bug report or feature request? (choose one)

🐞 Bug report

💻 Version of CKEditor

"@ckeditor/ckeditor5-alignment": "~10.0.2",
"@ckeditor/ckeditor5-autoformat": "^10.0.2",
"@ckeditor/ckeditor5-basic-styles": "^10.0.2",
"@ckeditor/ckeditor5-dev-utils": "^11.0.0",
"@ckeditor/ckeditor5-dev-webpack-plugin": "^7.0.0",
"@ckeditor/ckeditor5-editor-classic": "^11.0.0",
"@ckeditor/ckeditor5-essentials": "^10.1.1",
"@ckeditor/ckeditor5-highlight": "~10.0.2",
"@ckeditor/ckeditor5-image": "^10.2.0",
"@ckeditor/ckeditor5-link": "^10.0.3",
"@ckeditor/ckeditor5-list": "^11.0.1",
"@ckeditor/ckeditor5-table": "~10.1.0",
"@ckeditor/ckeditor5-theme-lark": "^11.0.0",
"@ckeditor/ckeditor5-upload": "^10.0.2",
"@samhammer/ckeditor5-simple-image-upload-plugin": "~1.0.1",

📋 Steps to reproduce

Apply the following content to the editor:

<div>
    <table>
        <tbody>
            <tr>
                <td>
                    <table>
                        <tbody>
                            <tr>
                                <td>Testinner</td>
                            </tr>
                        </tbody>
                    </table>
                </td>
                <td>
                    Testouter
                </td>
            </tr>
        </tbody>
    </table>
    <p><br>&nbsp;<br></p>
</div>

✅ Expected result

The content is displayed as specified.

❎ Actual result

No content is displayed. The following JS error appears:

ckeditor.js:72487 Uncaught (in promise) TypeError: Cannot read property 'position' of null
    at upcastdispatcher_UpcastDispatcher.dispatcher.on (ckeditor.js:72487)
    at upcastdispatcher_UpcastDispatcher.fire (ckeditor.js:1733)
    at upcastdispatcher_UpcastDispatcher._convertItem (ckeditor.js:32121)
    at upcastdispatcher_UpcastDispatcher._convertChildren (ckeditor.js:32152)
    at upcastdispatcher_UpcastDispatcher.<anonymous> (ckeditor.js:32790)
    at upcastdispatcher_UpcastDispatcher.fire (ckeditor.js:1733)
    at upcastdispatcher_UpcastDispatcher._convertItem (ckeditor.js:32121)
    at upcastdispatcher_UpcastDispatcher._convertChildren (ckeditor.js:32152)
    at upcastdispatcher_UpcastDispatcher.<anonymous> (ckeditor.js:32790)
    at upcastdispatcher_UpcastDispatcher.fire (ckeditor.js:1733)

This ck-build is used.

📃 Other details that might be useful

If I remove the nested table, it works.
Please let me know if you need more infos.
Thanks!

@Reinmar
Copy link
Member

Reinmar commented Sep 24, 2018

Hi! One thing here is that the editor should not crash when loading such a content. The second thing is a support for nested tables. Right now the latter wasn't on our radar. I reported https://github.com/ckeditor/ckeditor5-table/issues/121 to track it. Could you give us more details in which cases nested tables are useful? It doesn't seem as something people would normally do.

@Reinmar
Copy link
Member

Reinmar commented Sep 24, 2018

I tested the markup that you provided on https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/features/table.html (latest master's build) and it works fine:

image

No crashes, but of course the nested table is filtered out due to https://github.com/ckeditor/ckeditor5-table/issues/121. Could you confirm that it works this way for you too?

@ckotzbauer
Copy link
Author

Hi @Reinmar,
thanks for your quick reply!

Yes, I can confirm that the latest master build from the table-plugin fixes the crash. 👍

We do not "need" this feature for editing. But we have to handle incoming mails with our application. I found this nested table in a mail signature.

@Reinmar
Copy link
Member

Reinmar commented Sep 24, 2018

Thanks. I copied your use case to https://github.com/ckeditor/ckeditor5-table/issues/121.

I'll close this ticket and we can continue the discussion in the other one.

@Reinmar Reinmar closed this as completed Sep 24, 2018
@Reinmar Reinmar added this to the iteration 20 milestone Sep 24, 2018
@Reinmar Reinmar added the type:bug This issue reports a buggy (incorrect) behavior. label Sep 24, 2018
@ckotzbauer
Copy link
Author

I just figured out, that my update to the latest master build of the table-plugin yesterday broke the creation of new tables cause of missing functions in the ckeditor5-engine package. I tried to update that too, but that caused even more inconsistencies. Is there an estimation date when a new set of versions is released?

@Reinmar
Copy link
Member

Reinmar commented Sep 25, 2018

We've got a code freeze next week and then in max 2 weeks (it's a big release) all will be out. For now, you'd need to obtain all the source via our development environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants