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

Error invalid-lts-license-key #253

Open
TPSONLINE-INFO opened this issue Aug 25, 2023 · 34 comments
Open

Error invalid-lts-license-key #253

TPSONLINE-INFO opened this issue Aug 25, 2023 · 34 comments

Comments

@TPSONLINE-INFO
Copy link

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

@DMeloni
Copy link

DMeloni commented Aug 25, 2023

We also use CKEditor4 through FOSCKEditorBundle for our back office tools. It stopped working yesterday afternoon.

@TPSONLINE-INFO
Copy link
Author

TPSONLINE-INFO commented Aug 25, 2023 via email

@TPSONLINE-INFO
Copy link
Author

TPSONLINE-INFO commented Aug 25, 2023 via email

@nicocau
Copy link

nicocau commented Aug 25, 2023

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.

@pfpro
Copy link

pfpro commented Aug 25, 2023

same issue here (with php 8.2 / symfony 6.3.3)

@TPSONLINE-INFO
Copy link
Author

TPSONLINE-INFO commented Aug 25, 2023 via email

@antoinemineau
Copy link

antoinemineau commented Aug 25, 2023

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"
        },

@TPSONLINE-INFO
Copy link
Author

TPSONLINE-INFO commented Aug 25, 2023 via email

@timba64
Copy link

timba64 commented Aug 29, 2023

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",

@mailspayes
Copy link

@timba64
Connect to your local :
bin/console ckeditor:install --tag=4.22.1
bin/console assets:install

@jayesbe
Copy link

jayesbe commented Aug 31, 2023

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..

@jayesbe
Copy link

jayesbe commented Aug 31, 2023

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

@alexandre-mace
Copy link

@jayesbe I tried your solution and its not working either, which local copy version did you download ?

@jayesbe
Copy link

jayesbe commented Sep 4, 2023

@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.

@alexandre-mace
Copy link

Sadly its still not working for me but thank you for the file !

@Gumbraise
Copy link

@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

@alexandre-mace
Copy link

alexandre-mace commented Sep 4, 2023

There you go @Gumbraise, https://we.tl/t-79OfSRcLPZ, the file is working i had client cache 😂

@Amunak
Copy link

Amunak commented Sep 10, 2023

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.

@peterbruins
Copy link

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.

@pfpro
Copy link

pfpro commented Oct 22, 2023

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)

@PhilETaylor
Copy link

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

@Resetnak
Copy link

Resetnak commented Oct 26, 2023

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.

@GaetanMedas
Copy link

If you are using NPM, use :
npm install --save ckeditor4@4.22.1
then :
npm run dev

@tonythecodeur
Copy link

tonythecodeur commented Oct 31, 2023

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';

@xDeSwa
Copy link

xDeSwa commented Nov 17, 2023

bin/console ckeditor:install --tag=4.22.1 automatically installed 4,23 so same error.
yarn add ckeditor4@4.22.1 automatically installed 4,23 so same error.

npm install --save ckeditor4@4.22.1 this works # installed 4.22.1

@radiz13
Copy link

radiz13 commented Feb 7, 2024

EDIT : config option versionCheck: false Fixed 🥇

Someone has the message ? How to disable it ? Thx
cke

@Jean-Gian
Copy link

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?

@pfpro
Copy link

pfpro commented Feb 8, 2024

yeah,
@ckeditor crew: make us a nice offer !

@DMeloni
Copy link

DMeloni commented Feb 8, 2024

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

@mischabraam
Copy link

mischabraam commented Feb 9, 2024

EDIT : config option versionCheck: false Fixed 🥇

Someone has the message ? How to disable it ? Thx cke

Where did you configure this? @radiz13

@pfpro
Copy link

pfpro commented Feb 9, 2024

in fos_ckeditor.yaml

@mischabraam
Copy link

Cool thanks. Found it indeed.

fos_ck_editor:
    input_sync: true
    default_config: default
    configs:
        default:
            versionCheck: false
            toolbar:
                - { name: "styles", items: ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'RemoveFormat'] }
                - { name: "paragraph", items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote']}
                - { name: "colors", items: ['TextColor', 'BGColor']}
                - { name: "links", items: ['Link', 'Unlink']}
                - { name: "media", items: ['Image', 'Youtube']}
                - { name: "tools", items: ['Maximize']}
            extraPlugins: "youtube"

@Jean-Gian
Copy link

@DMeloni i totally agree, but I'm being even more pragmatic here.
Depending how much the license is, it might be more convenient to pay for it for a period of time while implementing another solution. This doesn't mean giving in to blackmailing, but just making the most sensible choice we might have in the short term.
About blackmailing, yes, they are doing their best to get more money they they can, and the behaviour is deplorable.
I've been in contact with them but they won't tell what the price is. They are trying everything to understand how badly someone needs a license to adjust the price accordingly. Horrible

@Jean-Gian
Copy link

Are you all ready to laugh?
I got a reply about their license prices and i quote:

The minimum subscription fee we do offer for CKEditor 4 Extended Support Model - Security Vulnerability Assurance: $9,400 / year. This fee covers up to 250 users of CKEditor 4 across your client's applications and guarantees that we will deliver security fixes to CKEditor 4

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

No branches or pull requests