dargullin/icheck is returning a 404

Created on 25 November 2024, 3 months ago

Problem/Motivation

When I was running composer install I got an error regarding the jquery/icheck library. The URL https://github.com/dargullin/icheck/archive/refs/tags/1.0.2.zip is currently returning a 404. Creating this issue to see if anyone knows why that might be the case.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.3

Component

Code

Created by

🇺🇸United States dmundra Eugene, OR

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @dmundra
  • 🇺🇸United States dmundra Eugene, OR

    The 1.0.3 and 1.0.2 releases on https://github.com/drgullin/icheck/releases are returning 404s. Might need a work around.

  • 🇧🇷Brazil aluzzardi Pelotas, RS

    Same here.
    My suggestion is to move from getting from github and pull it from asset.packagist.org:

    https://asset-packagist.org/package/bower-asset/icheck

    For now, adding this to you repositories array on your root composer.json should will solve:

        "jquery.icheck": {
          "type": "package",
          "package": {
            "name": "jquery/icheck",
            "version": "1.0.2 ",
            "type": "drupal-library",
            "extra": {
              "installer-name": "jquery.icheck"
            },
            "dist": {
              "url": "https://api.github.com/repos/drgullin/icheck/zipball/8a6eb37bd7dab1e843c1b630c91c6398ff409d05",
              "type": "zip"
            },
            "license": "MIT"
          }
        }

    Or replacing the url: https://codeload.github.com/drgullin/icheck/zip/1.0.2/tags/1.0.2
    On your composer.lock to: https://api.github.com/repos/drgullin/icheck/zipball/8a6eb37bd7dab1e843c...

  • 🇺🇸United States dmundra Eugene, OR

    GitHub issue https://github.com/drgullin/icheck/issues/440

    Thanks @aluzzardi. I will try that.

  • Merge request !561Replacing jquery/icheck URL with a different one → (Merged) created by dmundra
  • Pipeline finished with Success
    3 months ago
    Total: 530s
    #349806
  • 🇺🇸United States dmundra Eugene, OR

    Adding the package to composer.json didn't work because the wikimedia/composer-merge-plugin would still override with the webform version.

    The patching of the upstream file in the webform module also didn't work for our project as the patch is applied to late.

  • 🇺🇸United States dmundra Eugene, OR

    Hiding patch file.

  • 🇺🇸United States themodularlab

    @aluzzardi,

    #3 works for me. Thanks!

  • 🇺🇸United States kmonty San Francisco, CA

    Not to hijack this, but this would be a good opportunity to upgrade to 1.0.3 as well. The release being used with iCheck is from 2014.

  • 🇺🇸United States rkelbel48

    Yep same,
    Swapping over the url to https://api.github.com/repos/drgullin/icheck/zipball/8a6eb37bd7dab1e843c...
    mentioned in #3 worked for me as well.

  • 🇺🇸United States lhridley

    Ran into the same issue on a client project today. In my case, the only submodule of the Webform module that was actualy being used was the webform_toggle module, which depends on the jquery/toggles:^4.0 library.

    But the client had included the entire composer.libraries.json file from the Webform module in their main project composer.json file, which proved problematic to just remove.

    Here's how I solved this issue:

    1. I reviewed the webform submodules that were enabled on the site, and identified the javascript libraries that were actually being used in the project.
    2. I removed the webform module from the composer.json file with composer remove drupal/webform
    3. I then deleted the merge-plugin include for the webform composer.libraries.json file from the project's main composer.json file, and then executed composer update --lock
    4. I then reinstalled the webform module with composer require drupal/webform:^6.2
    5. I took the package repository reference from the webform composer.libraries.json file and placed it in the "repositories" section of the main composer.json file for the project, and ran composer update --lock
    6. I then executed composer require >jquery/toggles:^4.0 to install the javascript library needed for the submodule to operate.

    Opened a pull request against the project, and the client merged it in late this evening.

    This step by step process should work for any project EXCEPT the jquery/icheck library, The issue at hand is that the archive zip and tarball files for the release required by the Webform's composer.libraries.json file are missing from Github. Version 1.0.1 however, still has the release zip and tarbal files on Github, so you could include the jquery/icheck package repository reference, change the version to 1.0.1 instead of 1.0.2, and you should get a workable javascript library. Check the release notes for the 1.0.1 vs 1.0.2 release to see what changed before you do.

    For safety's sake, just in case the release tarbal and zip files gets removed for release 1.0.1, you might consider manually installing the library into your project's library directory and committing the source code to your code repository to keep from losing it again. Just a thought.

    Hope this helped someone.

  • 🇺🇸United States smustgrave

    Think this can be elevated as this is probably breaking a number of pipelines.

  • 🇵🇭Philippines ambot112

    The plain diff from mr is not working because it is pointing to line 157. For the meantime, this plain patch might help.

  • 🇵🇰Pakistan monymirza Islamabad

    #14 working.

  • Pipeline finished with Canceled
    3 months ago
    Total: 174s
    #350237
  • Pipeline finished with Success
    3 months ago
    Total: 445s
    #350247
  • 🇮🇳India gouthamraon

    #14 worked for me. Thanks for the patch @ambot112.

  • 🇵🇭Philippines mjgruta

    FYI, if you already have a composer.lock file. The patch will not work so you need to override it by adding this code to your composer.json or better if you have composer.libraries.json file then add this on the require section "jquery/icheck": "1.0.2".
    After this just run composer require drupal/webform:^6.2 or what ever version you would like. This will generate the correct composer lock hash.

    "jquery.icheck": {
    "type": "package",
    "package": {
    "name": "jquery/icheck",
    "version": "1.0.2 ",
    "type": "drupal-library",
    "extra": {
    "installer-name": "jquery.icheck"
    },
    "dist": {
    "url": "https://api.github.com/repos/drgullin/icheck/zipball/8a6eb37bd7dab1e843c...",
    "type": "zip"
    },
    "license": "MIT"
    }

  • 🇪🇸Spain omarlopesino

    Looks like as the username changed from dargullin to drgullin the download links are broken. Seems a temporary issue.

    Alternatively to the patch, I suggest another solution that is only valid when the library is not being used in the project: adding the library to replace.
    For example:

        "replace": {
            "jquery/icheck": "*"
        },
    
  • 🇩🇪Germany suresh.senthatti Berlin

    This patch is for current 6.2 release

  • 🇩🇪Germany yannickoo Berlin

    FYI after applying the patch it was needed to run composer update jquery/icheck so that the new URL of the libraries is changed in composer.lock file as well ✨

  • 🇦🇹Austria daniel.pernold

    We are using projects with OpenSocial and are therefore stuck with Webform 6.1.8 atm. The only solution that works for us in this case is placing the following in our composer.json.

        "repositories": [
            {
                "type": "package",
                "package": {
                    "name": "jquery/icheck",
                    "version": "1.0.2",
                    "type": "drupal-library",
                    "extra": {
                        "installer-name": "jquery.icheck"
                    },
                    "dist": {
                        "url": "https://github.com/drgullin/icheck/archive/refs/heads/1.0.2.zip",
                        "type": "zip"
                    }
                }
            }
        ]
    
  • 🇷🇸Serbia miksha

    #14 worked for us to! Thanks.

  • 🇬🇧United Kingdom Mattgh9152

    #14 also worked for me, #19 did not work even though I was on webforms 6.2

  • 🇸🇪Sweden emek

    #14 works for us, we use Webform 6.2.7

  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    RE #10 It might be better to look into deprecating/replacing the use of this. It really looks abandoned as there has been no activity for over 4 years on the project since the last release.

  • Pipeline finished with Skipped
    3 months ago
    #350591
  • First commit to issue fork.
  • 🇺🇸United States jrockowitz Brooklyn, NY

    I am going to merge this and backport it to 6.2.x

  • 🇺🇸United States jrockowitz Brooklyn, NY
  • 🇺🇸United States luke.leber Pennsylvania

    +1 on deprecating the library.

    The maintainer was explicitly presented with a dialog explaining what changing their username entails. They chose to do this despite the warnings about downstream chaos it would create.

    To me, that means they probably shouldn't be an upstream dependency if such a change was made on a whim in this age of supply chain attacks.

  • 🇨🇦Canada JayDarnell Guelph, Ontario

    #14 worked for me on Webform 6.2.7. Thanks!

    Oh, and hi dmundra!

  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    I created a follow up to try to deprecate the use of this plugin. (RE #32 & #25)

    📌 Deprecate the use of drgullin/icheck Active

  • 🇺🇸United States dmundra Eugene, OR

    Hey @jaydarnell

    Thank you @jrockowitz for merging and releasing a new version. Appreciate that.

  • 🇺🇸United States tony.sayge Kansas City

    @jrockowitz thank you so much for releasing a new version! Huge time-saver.

  • 🇨🇦Canada TrevorBradley

    6.2.8 doesn't include https://www.drupal.org/files/issues/2024-11-26/webform-icheck-library-is... .

    I'm still getting deploy fails with the call in webform_icheck.module:

    In CurlDownloader.php line 641:
                                                                                   
      The "https://codeload.github.com/drgullin/icheck/zip/1.0.2/tags/1.0.2" file  
       could not be downloaded (HTTP/2 404 )                                       
                                                 
    function webform_icheck_webform_libraries_info() {
      $libraries = [];
      $libraries['jquery.icheck'] = [
        'title' => t('jQuery: iCheck'),
        'description' => t('Highly customizable checkboxes and radio buttons.'),
        'notes' => t('iCheck is used to optionally enhance checkboxes and radio buttons.'),
        'homepage_url' => Url::fromUri('http://icheck.fronteed.com/'),
        'download_url' => Url::fromUri('https://github.com/dargullin/icheck/archive/refs/tags/1.0.2.zip'),
        'version' => '1.0.2 ',
        'optional' => FALSE,
        'deprecated' => t('The iCheck library is not being maintained. It has been <a href=":href">deprecated</a> and will be removed in Webform 7.0.', [':href' => 'https://www.drupal.org/project/webform/issues/2931154']),
        'license' => 'MIT',
      ];
      return $libraries;
    }

    Trying to patch webform in addition to the 6.2.8 update to see if that fixes the issue...

  • 🇨🇦Canada TrevorBradley

    Nope, user error here. webform_icheck_webform_libraries_info() is just fine (especially when uninstalled).

    Folks, a note it's important to run a composer update --lock to make sure composer.lock correctly links to the right library.

  • 🇧🇷Brazil aluzzardi Pelotas, RS

    Another important thing is that before you run the composer update --lock remove the library from the libraries folder, otherwise it will not get the updated URL.
    Composer need to detect that is missing to download and update the from the new URL.

    I tried only the composer update --lock and was still having the issue, if you do not want to remove it, you can go to the composer.lock file and change the URL manually.

  • 🇨🇦Canada pierre paul lefebvre

    I was curious if I could create a github account with the previous username, then create a new repository with the same name with the same tags. Turns out github blocks you at the repository creation (user creation worked). Which is good, anyone could have bundled anything in that package.

  • 🇳🇱Netherlands Dimiter

    I just wanted to mention that the solution of #20 by @yannickoo works fine when still receiving 404-errors after updating Webform to 6.2.8 :

    FYI after applying the patch it was needed to run composer update jquery/icheck so that the new URL of the libraries is changed in composer.lock file as well ✨

  • 🇺🇸United States dmundra Eugene, OR

    FYI, I had reached out to GitHub support about this issue and they fixed the original 404 for the URLs so https://github.com/dargullin/icheck/archive/refs/tags/1.0.2.zip should be working again.

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Success
    about 2 months ago
    Total: 236s
    #379848
  • Pipeline finished with Success
    about 2 months ago
    Total: 325s
    #379929
  • Pipeline finished with Failed
    about 1 month ago
    Total: 841s
    #397960
Production build 0.71.5 2024