Code Monkey home page Code Monkey logo

Comments (11)

FlorentTorregrosa avatar FlorentTorregrosa commented on May 28, 2024 4

@albertvolkman you can add repositories into your composer.json

"ckeditor.autogrow": {
      "type": "package",
      "package": {
        "name": "ckeditor/autogrow",
        "version": "4.6.2",
        "type": "drupal-library",
        "extra": {
          "installer-name": "ckeditor.autogrow"
        },
        "dist": {
          "url": "http://download.ckeditor.com/autogrow/releases/autogrow_4.6.2.zip",
          "type": "zip"
        },
        "require": {
          "composer/installers": "~1.0"
        }
      }
    },

Then in your require section:
"ckeditor/autogrow": "4.6.2",

It is the current way the Webform module in Drupal 8 (https://www.drupal.org/project/webform) offers to do to download the library.
But the problem is that it is not a https URL so you need to disable Composer secure connection.

from ckeditor4-releases.

Reinmar avatar Reinmar commented on May 28, 2024

3rd party plugins are not available through Composer and will never be, because we cannot publish these plugins.

Therefore, the recommended way in your case is to build a package.

from ckeditor4-releases.

albertvolkman avatar albertvolkman commented on May 28, 2024

So, if I were to build a package... that'd ruin the point of Composer, no? I wouldn't have a way to reference it.

from ckeditor4-releases.

Reinmar avatar Reinmar commented on May 28, 2024

Yes. In general – if you want to customise the editor, then using either CDN-ed or npm/Composer/Bower version may not make sense (depends on whether you strip or add stuff and how much). CKEditor needs to be built in order to be properly optimised. And building is much more complex than just concatenating stuff so that needs to be done by our builder (it's also available in CLI). Of course you can be brutal and load some of our presets plus load the 3rd party plugins you want, but that won't give a good result (the result can in fact be very bad if you load multiple plugins).

On http://cdn.ckeditor.com/ you can find how to load local plugins and skins. You can install CKEditor using Composer plus the syntaxhighlight plugin in some other way (unless Composer allows installing straight from a Git repo – then you can use its repo). Then, just notify CKEditor about that plugin and it'll work. But please remember that it stops making sense when you load more plugins this way.

from ckeditor4-releases.

mariagwyn avatar mariagwyn commented on May 28, 2024

@FlorentTorregrosa: The code above does not work, even when the url is changed to https. Every time, composer issues this error:

`Downloading https://download.ckeditor.com/autogrow/releases/autogrow_4.6.2.zip
Downloading (connecting...)Content-Length mismatch, received 0 out of 290 bytes: ()

Failed: [Composer\Downloader\TransportException] 0: Content-Length mismatch, received 0 bytes out of the expected 290

Installation failed, reverting ./composer.json to its original content.

[Composer\Downloader\TransportException]
Content-Length mismatch, received 0 bytes out of the expected 290

Exception trace:
() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Util/RemoteFilesystem.php:289
Composer\Util\RemoteFilesystem->get() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Util/RemoteFilesystem.php:86
Composer\Util\RemoteFilesystem->copy() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Downloader/FileDownloader.php:146
Composer\Downloader\FileDownloader->doDownload() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Downloader/FileDownloader.php:93
Composer\Downloader\FileDownloader->download() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Downloader/ArchiveDownloader.php:36
Composer\Downloader\ArchiveDownloader->download() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Downloader/ZipDownloader.php:71
Composer\Downloader\ZipDownloader->download() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Downloader/DownloadManager.php:213
Composer\Downloader\DownloadManager->download() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Installer/LibraryInstaller.php:186
Composer\Installer\LibraryInstaller->installCode() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Installer/LibraryInstaller.php:90
Composer\Installer\LibraryInstaller->install() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Installer/InstallationManager.php:173
Composer\Installer\InstallationManager->install() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Installer/InstallationManager.php:160
Composer\Installer\InstallationManager->execute() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Installer.php:587
Composer\Installer->doInstall() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Installer.php:223
Composer\Installer->run() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Command/RequireCommand.php:180
Composer\Command\RequireCommand->execute() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/vendor/symfony/console/Command/Command.php:266
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/vendor/symfony/console/Application.php:861
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/vendor/symfony/console/Application.php:208
Symfony\Component\Console\Application->doRun() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Console/Application.php:245
Composer\Console\Application->doRun() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/vendor/symfony/console/Application.php:127
Symfony\Component\Console\Application->run() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/src/Composer/Console/Application.php:100
Composer\Console\Application->run() at phar:///usr/local/Cellar/composer/1.4.1/libexec/composer.phar/bin/composer:54
require() at /usr/local/Cellar/composer/1.4.1/libexec/composer.phar:24
`

Is there something else required in the the composer.json?

from ckeditor4-releases.

FlorentTorregrosa avatar FlorentTorregrosa commented on May 28, 2024

@mariagwyn: hello. Do you also have a "composer/installers": "^1.0.21", in your "require" section of Composer? Such as https://github.com/Drupal-FR/site-drupalfr/blob/8.x-1.x/composer.json

Now I use the Drush comand provided by Webform to upload my composer.json, and it works.

from ckeditor4-releases.

mariagwyn avatar mariagwyn commented on May 28, 2024

Installers is already required. So you never got this command actually working? I am able to use the identical setup for other downloads and it works. I wonder if ckeditors site does not take curl command, or whatever it is that composer uses.

from ckeditor4-releases.

erichomanchuk avatar erichomanchuk commented on May 28, 2024

@mariagwyn This code used to work as I have been using this method to install ckeditor plugins which has been working fine until recently. Now I get the error "Content-length mismatch" and it will not download.

from ckeditor4-releases.

RDeuzeman avatar RDeuzeman commented on May 28, 2024

@erichomanchuk, did you got it to work again? I am also getting this 'Content-length mismatch' error and can't get it to work.

from ckeditor4-releases.

erichomanchuk avatar erichomanchuk commented on May 28, 2024

@RDeuzeman, had no luck getting it to work so I had to move the zip files to our private server to be able to download them.

from ckeditor4-releases.

mariagwyn avatar mariagwyn commented on May 28, 2024

All: I started a new issue (linked above) and pinged you all there.

from ckeditor4-releases.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.