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

Issue fork webform-3489710

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dmundra created an issue. See original summary.

dmundra’s picture

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

aluzzardi’s picture

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

dmundra’s picture

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

Thanks @aluzzardi. I will try that.

dmundra’s picture

dmundra’s picture

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.

dmundra’s picture

Hiding patch file.

themodularlab’s picture

@aluzzardi,

#3 works for me. Thanks!

kmonty’s picture

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.

rkelbel48’s picture

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

lisa.rae’s picture

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 for the jquery/toggles library 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 tarball files on Github when I checked earlier today, 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 get 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.

smustgrave’s picture

Priority: Normal » Major

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

ambot112’s picture

StatusFileSize
new650 bytes

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

monymirza’s picture

Status: Active » Reviewed & tested by the community

#14 working.

gouthamraon’s picture

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

mjgruta’s picture

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

omarlopesino’s picture

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": "*"
    },
suresh.senthatti’s picture

StatusFileSize
new588 bytes

This patch is for current 6.2 release

yannickoo’s picture

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 ✨

daniel.pernold’s picture

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"
                }
            }
        }
    ]
miksha’s picture

#14 worked for us to! Thanks.

mattgh9152’s picture

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

emek’s picture

#14 works for us, we use Webform 6.2.7

bramdriesen’s picture

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.

jrockowitz made their first commit to this issue’s fork.

jrockowitz’s picture

Status: Reviewed & tested by the community » Fixed

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

  • dmundra authored f88d0a1b on 6.2.x
    Issue #3489710: dargullin/icheck is returning a 404
    
jrockowitz’s picture

luke.leber’s picture

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

jaydarnell’s picture

#14 worked for me on Webform 6.2.7. Thanks!

Oh, and hi dmundra!

bramdriesen’s picture

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

#3489932: Move deprecated modules into webform_deprecated

dmundra’s picture

Hey @jaydarnell

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

tony.sayge’s picture

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

trevorbradley’s picture

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

trevorbradley’s picture

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.

aluzzardi’s picture

Another important thing is that before you run the composer update --lock, if you are using the patch for version 6.2.7 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.

pierrepaul’s picture

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.

dimiter’s picture

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 ✨

That looks like the proper solution, instead of deleting lockfiles as mentioned above.

dmundra’s picture

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.

Status: Fixed » Closed (fixed)

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