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

CKEditor is not loaded after -not cached- page preview from backend #122

Closed
lucmuller opened this issue Mar 8, 2021 · 12 comments · Fixed by #127
Closed

CKEditor is not loaded after -not cached- page preview from backend #122

lucmuller opened this issue Mar 8, 2021 · 12 comments · Fixed by #127
Labels
bug wip work in progress

Comments

@lucmuller
Copy link

This is a little bit tricky !
In rte_ckeditor_image/Resources/Public/JavaScript/Plugins/typo3image.js
There's a problem with :
require(['jquery'], function (jquery) {

As the $ variable is initialiased at the begining of the code, if Jquery is not loaded properly, then the rest of the code depending on $ fails.

A quick workaround for this is to simply comment out the line :
//var $;

Step to reproduce the anomaly :

  • Clear The caches of the page
  • Click the preview button
  • Wait for the page to be fully loaded
  • Go back to the backend editor
  • Ckeditor is not loaded anymore.
    See :
    image
@lucmuller
Copy link
Author

lucmuller commented Mar 8, 2021

Maybe linked to #110 (?)

@dogawaf
Copy link

dogawaf commented Mar 10, 2021

The whole code should be wrapped by
require(['jquery'], function ($) { // all code dependent on $ here });

@dogawaf
Copy link

dogawaf commented Mar 25, 2021

I've attached a working patch in #119

@mcmulman
Copy link
Contributor

mcmulman commented Apr 4, 2021

Thanks @dogawaf
@lucmuller please check again with #127

@mcmulman mcmulman added bug wip work in progress labels Apr 4, 2021
@jproy418
Copy link

Hi thanks for that fix! It's working for me.
Is a merge in the master (or a new release of the extension) planned soon ?

Thanks!

@Patta
Copy link

Patta commented Jul 22, 2021

I can also confirm this issue with TYPO3 10.4.18. #127 seems to fix this.

CybotTM added a commit that referenced this issue Nov 6, 2021
[BUGFIX] #122: Fix jquery requirement to not crash the ckeditor
@Patta
Copy link

Patta commented Dec 13, 2021

@CybotTM there is no fix for v10 for TYPO3 10.4 ?

@CybotTM
Copy link
Member

CybotTM commented Dec 16, 2021

Hi @Patta , please see release 10.2.0 if it works for you.

Cheers.

@Patta
Copy link

Patta commented Dec 17, 2021

@CybotTM thanks for the fast release! Works nice. Just the image icon is lightened and has the cke_button_disabled class.
image

@lucmuller
Copy link
Author

@Patta +1

Seems to work too, but the disabled styled icons is a bit confusing to deploy in production for contributors.

@CybotTM
Copy link
Member

CybotTM commented Dec 22, 2021

@Patta or @lucmuller, can you please create a new issue, thank you.
And of course, if you have a patch - please send.

Thank you.

@lucmuller
Copy link
Author

New issue is created (#145), but I do not have a patch right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug wip work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants