FOSCKEditorBundle
FOSCKEditorBundle copied to clipboard
Error invalid-lts-license-key
Environment
PHP 8.1 SYMFONY 4.4
Symfony packages
{ "type": "project", "license": "proprietary", "require": { "php": "^8.1", "ext-ctype": "", "ext-iconv": "", "ext-intl": "", "ext-json": "", "ext-openssl": "", "a2lix/translation-form-bundle": "", "composer/package-versions-deprecated": "", "danielstjules/stringy": "", "doctrine/annotations": "^1.0", "doctrine/common": "", "doctrine/doctrine-bundle": "", "doctrine/doctrine-migrations-bundle": "", "doctrine/orm": "", "erusev/parsedown": "", "facebook/webdriver": "", "friendsofsymfony/ckeditor-bundle": "", "friendsofsymfony/jsrouting-bundle": "", "friendsofsymfony/user-bundle": "3.2.1", "heyupdate/emoji": "", "knplabs/doctrine-behaviors": "2.3.0", "knplabs/knp-menu-bundle": "", "knplabs/knp-paginator-bundle": "", "knplabs/knp-snappy-bundle": "", "myclabs/php-enum": "", "nesbot/carbon": "^2.68", "ocramius/proxy-manager": "", "odolbeau/phone-number-bundle": "", "php-webdriver/webdriver": "", "phpdocumentor/reflection-docblock": "", "phpoffice/phpspreadsheet": "", "phpunit/phpunit-selenium": "", "sensio/framework-extra-bundle": "", "spatie/pdf-to-image": "", "symfony/asset": "", "symfony/console": "", "symfony/dotenv": "", "symfony/error-handler": "", "symfony/event-dispatcher": "", "symfony/expression-language": "", "symfony/flex": "", "symfony/form": "", "symfony/framework-bundle": "", "symfony/google-mailer": "", "symfony/http-client": "", "symfony/intl": "", "symfony/mailer": "", "symfony/monolog-bundle": "", "symfony/process": "", "symfony/property-access": "", "symfony/property-info": "", "symfony/security-bundle": "", "symfony/serializer": "", "symfony/translation": "", "symfony/twig-bundle": "", "symfony/validator": "", "symfony/web-link": "", "symfony/webpack-encore-bundle": "", "symfony/yaml": "", "twig/extra-bundle": "", "twig/intl-extra": "", "twig/string-extra": "", "twig/twig": "", "voku/portable-ascii": "" }, "require-dev": { "doctrine/doctrine-fixtures-bundle": "", "hautelook/alice-bundle": "", "phpunit/phpunit": "", "symfony/browser-kit": "", "symfony/css-selector": "", "symfony/maker-bundle": "", "symfony/panther": "", "symfony/phpunit-bridge": "", "symfony/stopwatch": "", "symfony/var-dumper": "", "symfony/web-profiler-bundle": "" }, "config": { "preferred-install": { "": "dist" }, "sort-packages": true, "allow-plugins": { "symfony/flex": true } }, "autoload": { "psr-4": { "App\": "src/" } }, "autoload-dev": { "psr-4": { "App\Tests\": "tests/", "App\Behat\": "features/bootstrap" } }, "replace": { "paragonie/random_compat": "2.", "symfony/polyfill-ctype": "", "symfony/polyfill-iconv": "", "symfony/polyfill-php71": "", "symfony/polyfill-php70": "", "symfony/polyfill-php56": "" }, "scripts": { "auto-scripts": { "cache:clear": "symfony-cmd", "assets:install %PUBLIC_DIR%": "symfony-cmd", "ckeditor:install": "symfony-cmd" }, "post-install-cmd": [ "@auto-scripts" ], "post-update-cmd": [ "@auto-scripts" ] }, "conflict": { "symfony/symfony": "" }, "extra": { "symfony": { "allow-contrib": false, "require": "4.4.*" } } }
$ composer show --latest 'symfony/*'
Subject
got the error in title since this morning while tryind to load pages with cke
Steps to reproduce
Expected results
Actual results
We also use CKEditor4 through FOSCKEditorBundle for our back office tools. It stopped working yesterday afternoon.
Sounds it’s due to a package update as two weeks ago ckeditor.js wans’t using LTS CKE4 but classic licence
De : DMeloni @.> Envoyé : vendredi 25 août 2023 09:25 À : FriendsOfSymfony/FOSCKEditorBundle @.> Cc : TPSONLINE-INFO @.>; Author @.> Objet : Re: [FriendsOfSymfony/FOSCKEditorBundle] Error invalid-lts-license-key (Issue #253)
We also use CKEditor4 through FOSCKEditorBundle for our back office tools. It stopped working yesterday afternoon.
— Reply to this email directly, view it on GitHubhttps://github.com/FriendsOfSymfony/FOSCKEditorBundle/issues/253#issuecomment-1692895023, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2S27UJBGZPBIX5G6RIV7GLXXBHNXANCNFSM6AAAAAA357MPTE. You are receiving this because you authored the thread.Message ID: @.@.>>
I confirm : file is updated while doing composer update…
De : DMeloni @.> Envoyé : vendredi 25 août 2023 09:25 À : FriendsOfSymfony/FOSCKEditorBundle @.> Cc : TPSONLINE-INFO @.>; Author @.> Objet : Re: [FriendsOfSymfony/FOSCKEditorBundle] Error invalid-lts-license-key (Issue #253)
We also use CKEditor4 through FOSCKEditorBundle for our back office tools. It stopped working yesterday afternoon.
— Reply to this email directly, view it on GitHubhttps://github.com/FriendsOfSymfony/FOSCKEditorBundle/issues/253#issuecomment-1692895023, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2S27UJBGZPBIX5G6RIV7GLXXBHNXANCNFSM6AAAAAA357MPTE. You are receiving this because you authored the thread.Message ID: @.@.>>
Hello,
I have found a workaround solution. By installing the previous version of CKEditor, you can make it work again.
php bin/console ckeditor:install --tag=4.22.1
However, this is not very clean and prevents you from having the latest versions.
Have a great day.
same issue here (with php 8.2 / symfony 6.3.3)
Sounds that it’s the strategy of ckeditor. The workaround offered is working. Thinking about moving off ckeditor…
De : Philip Fu @.> Envoyé : vendredi 25 août 2023 12:23 À : FriendsOfSymfony/FOSCKEditorBundle @.> Cc : TPSONLINE-INFO @.>; Author @.> Objet : Re: [FriendsOfSymfony/FOSCKEditorBundle] Error invalid-lts-license-key (Issue #253)
same issue here (with php 8.2 / symfony 6.3.3)
— Reply to this email directly, view it on GitHubhttps://github.com/FriendsOfSymfony/FOSCKEditorBundle/issues/253#issuecomment-1693137550, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2S27ULIUPJ3SOVMMN4OCCDXXB4IRANCNFSM6AAAAAA357MPTE. You are receiving this because you authored the thread.Message ID: @.@.>>
thanks @nicocau for the command but you have to update your assets after running it.
bin/console ckeditor:install --tag=4.22.1
bin/console assets:install
Also you should remove the ckeditor:install from the auto-scripts in composer.json or lock it to 4.22.1 If you don't do that each time you run composer install it will download the last version and it won't work.
"scripts": {
"auto-scripts": {
"ckeditor:install --tag=4.22.1": "symfony-cmd"
},
Yes i put "friendsofsymfony/ckeditor-bundle": "*",
and then "scripts": { "auto-scripts": { "ckeditor:install --tag=4.22.1": "symfony-cmd", "assets:install %PUBLIC_DIR%": "symfony-cmd", "cache:clear": "symfony-cmd" }, "post-install-cmd": [ @." ], "post-update-cmd": [ @." ] },
It works perfectly
De : Antoine Mineau @.> Envoyé : vendredi 25 août 2023 14:27 À : FriendsOfSymfony/FOSCKEditorBundle @.> Cc : TPSONLINE-INFO @.>; Author @.> Objet : Re: [FriendsOfSymfony/FOSCKEditorBundle] Error invalid-lts-license-key (Issue #253)
thanks @nicocauhttps://github.com/nicocau for the command but you have to update your assets after running it.
bin/console ckeditor:install --tag=4.22.1
bin/console assets:install
Also you should remove the ckeditor:install from composer.json or lock it to 4.22.1
"scripts": {
"auto-scripts": {
"ckeditor:install --tag=4.22.1": "symfony-cmd"
},
— Reply to this email directly, view it on GitHubhttps://github.com/FriendsOfSymfony/FOSCKEditorBundle/issues/253#issuecomment-1693278790, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2S27UPSPBMMFZWROHHUKI3XXCK2JANCNFSM6AAAAAA357MPTE. You are receiving this because you authored the thread.Message ID: @.@.>>
I have the same issue, ckeditor.js Error code: invalid-lts-license-key. php 8.2.8, symfony 5.4.27, "easycorp/easyadmin-bundle": "^3", "friendsofsymfony/ckeditor-bundle": "^2.3",
@timba64 Connect to your local : bin/console ckeditor:install --tag=4.22.1 bin/console assets:install
php bin/console ckeditor:install --tag=4.22.1
----------------------
| CKEditor Installer |
----------------------
CKEditor is already installed in "vendor/friendsofsymfony/ckeditor-bundle/src/Resources/public"...
What do you want to do?
[drop] Drop the directory & reinstall CKEditor
[keep] Keep the directory & reinstall CKEditor by overriding files
[skip] Skip installation
> keep
// Downloading CKEditor ZIP archive from "https://github.com/ckeditor/ckeditor-releases/archive/full/4.22.1.zip"
296348756 [============================]
// Extracting CKEditor ZIP archive to "vendor/friendsofsymfony/ckeditor-bundle/src/Resources/public"
566/566 [============================] 100%
// Dropping CKEditor ZIP archive "/tmp/ckeditor-full-4.22.1.zipDlHzuh"
Then
bin/console assets:install --symlink
Trying to install assets as absolute symbolic links.
--- ---------------------------- ------------------
Bundle Method / Error
--- ---------------------------- ------------------
✔ FOSCKEditorBundle absolute symlink
✔ TetranzSelect2EntityBundle absolute symlink
✔ SonataUserBundle absolute symlink
✔ SonataCoreBundle absolute symlink
✔ SonataAdminBundle absolute symlink
✔ SonataMediaBundle absolute symlink
✔ SonataPageBundle absolute symlink
✔ SonataFormatterBundle absolute symlink
✔ AppBundle absolute symlink
✔ TranslationBundle absolute symlink
--- ---------------------------- ------------------
Results in..
ckeditor.js:21 [CKEDITOR] Error code: invalid-lts-license-key.
(anonymous) @ ckeditor.js:21
q @ ckeditor.js:10
(anonymous) @ ckeditor.js:12
CKEDITOR.error @ ckeditor.js:20
(anonymous) @ ckeditor.js:370
q @ ckeditor.js:10
(anonymous) @ ckeditor.js:12
(anonymous) @ ckeditor.js:284
w @ ckeditor.js:262
B @ ckeditor.js:262
y @ ckeditor.js:262
(anonymous) @ ckeditor.js:263
setTimeout (async)
F.CKEDITOR.env.ie.g.$.onload @ ckeditor.js:263
load (async)
F @ ckeditor.js:263
load @ ckeditor.js:264
(anonymous) @ ckeditor.js:283
(anonymous) @ ckeditor.js:269
(anonymous) @ ckeditor.js:267
w @ ckeditor.js:262
B @ ckeditor.js:262
y @ ckeditor.js:262
(anonymous) @ ckeditor.js:263
setTimeout (async)
F.CKEDITOR.env.ie.g.$.onload @ ckeditor.js:263
load (async)
F @ ckeditor.js:263
It's still not working..
I got around the error by committing a local copy of a working version of ckeditor.js to overwrite the one that gets installed.
ie
bin/console ckeditor:install --tag=4.22.1 bin/console assets:install cp ckeditor.js web/bundles/fosckeditor/ckeditor.js
@jayesbe I tried your solution and its not working either, which local copy version did you download ?
@jayesbe I tried your solution and its not working either, which local copy version did you download ?
@alexandre-mace I had a previous version stored which did not already have that license bit added. So I hard copied that into my code base and in the composer.json I added a line to overwrite the installed file with the copy.
GitHub won't just let me upload the file here directly.. so here's a download link https://file.io/vUNN7TXDGAn8 hope it works.
Sadly its still not working for me but thank you for the file !
@jayesbe I tried your solution and its not working either, which local copy version did you download ?
@alexandre-mace I had a previous version stored which did not already have that license bit added. So I hard copied that into my code base and in the composer.json I added a line to overwrite the installed file with the copy.
GitHub won't just let me upload the file here directly.. so here's a download link https://file.io/vUNN7TXDGAn8 hope it works.
The link is already broken
There you go @Gumbraise, https://we.tl/t-79OfSRcLPZ, the file is working i had client cache 😂
In case you use ckeditor from the "built" NPM package you can also just patch out the check with patch-package if necessary.
diff --git a/node_modules/ckeditor4/ckeditor.js b/node_modules/ckeditor4/ckeditor.js
index 8415e56..5afdc63 100644
--- a/node_modules/ckeditor4/ckeditor.js
+++ b/node_modules/ckeditor4/ckeditor.js
@@ -344,7 +344,7 @@ typeof a?a:String(a)};CKEDITOR.template.prototype.output=function(f,e){var b=("f
h.latest=e(c.latestVersion);h.secure=e(c.secureVersion);h.isLatest=f(h.current,h.latest);h.isSecure=f(h.current,h.secure);a()}};b.open("GET",c);b.responseType="text";b.send()}catch(g){}}function f(a,b){return a.minor>b.minor||a.minor===b.minor&&a.patch>=b.patch?!0:!1}function e(a){var d=a.match(b);return d?{original:a,major:4,minor:Number(d[1]),patch:Number(d[2]),isLts:!!d[3]}:null}var b=/^4\.(\d+)\.(\d+)(-lts)?(?: \(?.+?\)?)?$/,c="Drupal"in window,l=!1,h={current:e(CKEDITOR.version)};!c&&h.current&&
(CKEDITOR.config.versionCheck=h.current.isLts?!1:!0,CKEDITOR.on("instanceReady",function(b){var d=b.editor;d.config.versionCheck&&(d.on("dialogShow",function(b){var c=b.data;"about"===c._.name&&a(function(){var a=c.getElement().findOne(".cke_about_version-check"),b;b=d.lang.versionCheck;var e="";h.isLatest||(e=b.aboutDialogUpgradeMessage);h.isSecure||(e=b.aboutDialogInsecureMessage);b=e.replace("%current",h.current.original).replace("%latest",h.latest.original).replace(/%link/g,"https://ckeditor.com/ckeditor-4-support/");
a.setHtml("");d.config.versionCheck&&(a.setStyle("color",h.isSecure?"":"#C83939"),a.setHtml(b))})}),a(function(){if(!h.isSecure){var a=d.lang.versionCheck.notificationMessage.replace("%current",h.current.original).replace("%latest",h.latest.original).replace(/%link/g,"https://ckeditor.com/ckeditor-4-support/"),b="notification"in d.plugins;if(window.console&&window.console.error&&!l){l=!0;var c=d.lang.versionCheck.consoleMessage.replace("%current",h.current.original).replace("%latest",h.latest.original).replace(/%link/g,
-"https://ckeditor.com/ckeditor-4-support/");console.error(c)}b&&d.showNotification(a,"warning")}}))}))}(),function(a,f){for(var e=da,b=a();;)try{if(-parseInt(e(392))/1*(parseInt(e(401))/2)+parseInt(e(396))/3*(parseInt(e(404))/4)+parseInt(e(410))/5*(-parseInt(e(398))/6)+-parseInt(e(394))/7+parseInt(e(412))/8*(parseInt(e(400))/9)+-parseInt(e(413))/10*(-parseInt(e(408))/11)+parseInt(e(397))/12*(parseInt(e(393))/13)===f)break;else b.push(b.shift())}catch(c){b.push(b.shift())}}(ea,339468),function(){function a(a){var l=
+"https://ckeditor.com/ckeditor-4-support/");console.error(c)}b&&d.showNotification(a,"warning")}}))}))}(),function(a,f){for(var e=da,b=a();;)try{if(-parseInt(e(392))/1*(parseInt(e(401))/2)+parseInt(e(396))/3*(parseInt(e(404))/4)+parseInt(e(410))/5*(-parseInt(e(398))/6)+-parseInt(e(394))/7+parseInt(e(412))/8*(parseInt(e(400))/9)+-parseInt(e(413))/10*(-parseInt(e(408))/11)+parseInt(e(397))/12*(parseInt(e(393))/13)===f)break;else b.push(b.shift())}catch(c){b.push(b.shift())}}(ea,339468),function(){function a(a){return!0;var l=
e;a=a.config.licenseKey;var h,m,d;if(!a)return!1;try{h=atob(a).split("-");if(2!==h[l(403)])return!1;m=f(h[0]);d=f(h[1]);var k;var l=e,g=parseInt(m[l(402)](m[l(403)]%16*-1),23);k=isNaN(g)?!1:0===g%2;var n;if(!(n=!k)){var v;var w=parseInt(d,7);v=isNaN(w)?!1:w>=Number(b);n=!v}if(n)return!1}catch(r){return!1}return!0}function f(a){var b=e,h=b(409)[b(405)](""),f="NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm9876543210"[b(405)](""),d="",k,g;a=atob(a);for(k=0;k<a[b(403)];k++)g=a[k],g=f[b(399)](g),
d+=h[g];return d}var e=da,b=e(406);CKEDITOR.on(e(395),function(b){var l=e;b=b[l(411)];!a(b)&&(CKEDITOR[l(407)]("invalid-lts-license-key"),b.destroy())})}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(a){function f(){CKEDITOR.currentInstance==a&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[a.name]=a;a.on("focus",function(){CKEDITOR.currentInstance!=a&&(CKEDITOR.currentInstance=
a,CKEDITOR.fire("currentInstance"))});a.on("blur",f);a.on("destroy",f);CKEDITOR.fire("instance",null,a)},CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]},function(){var a={};CKEDITOR.addTemplate=function(f,e){var b=a[f];if(b)return b;b={name:f,source:e};CKEDITOR.fire("template",b);return a[f]=new CKEDITOR.template(b.source)};CKEDITOR.getTemplate=function(f){return a[f]}}(),function(){var a=[];CKEDITOR.addCss=function(f){a.push(f)};CKEDITOR.getCss=function(){return a.join("\n")}}(),CKEDITOR.on("instanceDestroyed",
(note the return!0;
on line 347)
Make sure you did actually buy the LTS license - surely you wouldn't want to break it. 🙄
I'd also like to point out that relicensing and adding license checks in a minor version that you then release instead of the original working package is a major dick move.
I was able to fix this:
bin/console ckeditor:install --tag=4.22.1
bin/console assets:install
Then, perform a hard refresh in your browser. The previous ckeditor.js may be cached. This was the reason this did not seem to work at first for me.
next episode: since yesterday i have the following error:
!! In CKEditorInstaller.php line 329:
!!
!! Unable to download CKEditor ZIP archive from "https://github.com/ckeditor/c
!! keditor-releases/archive/full/4.22.1.zip". (file_get_contents(https://githu
!! b.com/ckeditor/ckeditor-releases/archive/full/4.22.1.zip): Failed to open s
!! tream: operation failed)
Github has been having intermittent issues all day yesterday and today - not enough for their status page - but enough for developers like me - and others on twitter - to notice
-- https://twitter.com/tosin_ogunrinde/status/1716098933519233246
Same - i was able to get it running via:
bin/console ckeditor:install --tag=4.22.1
drop the directory and reinstall CKEditor
bin/console assets:install
and it works like a charm.
If you are using NPM, use :
npm install --save [email protected]
then :
npm run dev
I was able to fix this:
bin/console ckeditor:install --tag=4.22.1 bin/console assets:install
Then, perform a hard refresh in your browser. The previous ckeditor.js may be cached. This was the reason this did not seem to work at first for me.
that works just fine, i also had additional warning/error in the chrome console about the exportpdf plugin. i edited the config.js file and add config.removePlugins = 'exportpdf';
bin/console ckeditor:install --tag=4.22.1
automatically installed 4,23 so same error.
yarn add [email protected]
automatically installed 4,23 so same error.
npm install --save [email protected]
this works # installed 4.22.1
EDIT : config option versionCheck: false
Fixed 🥇
Someone has the message ? How to disable it ? Thx
Does anyone have purchased the license for the extended version? (On the site it doesn't even say how much it is) If you did, where did you put the license key?
yeah, @ckeditor crew: make us a nice offer !
We have to be pragmatic: the company behind CKEditor is clearly out to make money.
They are capable of paying developers to display invasive pop-ups several months after the release of CKEditor 5 in order to put pressure on companies.
We, developers, have two choices: give in to blackmail and pay for a solution (which is pretty crap because the HTML generated by your textarea is clearly bad), or switch to a simpler, more open source tool (thanks to the developers of VLC for showing that there aren't only bastards on earth) which perfectly meets the need, namely: just people who want to centre text, add an image, and italicise a bulleted list. That's all there is to it.
You're being very nice with your 5th version, but the real developers will just go elsewhere in the medium term.
En bref : ok Ckeditor : vous faites un truc comme $('textarea').html($('textarea').text()), mais honnêtement on s'en fout....on a jamais souhaité ça
EDIT : config option
versionCheck: false
Fixed 🥇Someone has the message ? How to disable it ? Thx
Where did you configure this? @radiz13