- Issue created by @Steve Hanson
- π―π΄Jordan Rajab Natshah Jordan
Thanks, Steve, for reporting
Try only for testing to add a static version for Drupal as
"drupal/core": "10.3.1",
in the rootcomposer.json
file.Only to check on which package is not letting the update, update to the latest Drupal
- πΊπΈUnited States Steve Hanson
What I am confused about is what is supposed to update the composer files in the upgrade process. Once I changed drupal/core and drupal/core-recommended drupal would upgrade, and all the rest of the upgrades happened that depended on 10.3 drupal - but now I am getting a few patches that are in composer.lock that will not apply to the new version of the modules.
- π―π΄Jordan Rajab Natshah Jordan
Try to delete the old
composer.lock
beforecomposer update -vvv
or you may docomposer install -vvv
- in Varbase 10.0.0-rc2 - Issue
#3437217 β
: Switched to a local patching system using vardot/varbase-patches and
cweagans/composer-patches
"~2"
within Varbase
- Issue
#3458615 β
: Updated Drupal Core to
~10.3.0
and~11.0.0
with support for recipes in Varbase Profile version requirements
- in Varbase 10.0.0-rc2 - Issue
#3437217 β
: Switched to a local patching system using vardot/varbase-patches and
- πΊπΈUnited States Steve Hanson
My current issue with the upgrade that I just do not understand is that composer keeps trying to apply a patch that fails.
Issue #3272629: Media Library widget display doesn't return to first page on applying filters": " https://www.drupal.org/files/issues/2022-03-30/media_library_pager_fix.p... β ",
I have tried to NOT apply that patch by removing it from the composer.lock file but it keeps getting put back in and I do not see where that is coming from.
- πΊπΈUnited States Steve Hanson
Even weirder - it is trying to patch a Drupal 7 module which does not exist (which would explain the failure). This must be some sort of leftover from the migration from Drupal 7 but I cannot see where it is getting put in.
- πΊπΈUnited States Steve Hanson
It seems to go wrong like this -- with composer update -vvv
patching file modules/layout_builder/tests/src/FunctionalJavascript/MoveSectionsFormTest.php patching file themes/stable9/css/layout_builder/layout-builder.css https://www.drupal.org/files/issues/2022-03-30/media_library_pager_fix.patch (Issue #3272629: Media Library widget display doesn't return to first page on applying filters) Downloading https://www.drupal.org/files/issues/2022-03-30/media_library_pager_fix.patch patch '-p2' --no-backup-if-mismatch -d '/home/wis/domains/dev.wis.community/public_html/docroot/core' < '/tmp/66ad2fef8579a.patch' Executing command (CWD): patch '-p2' --no-backup-if-mismatch -d '/home/wis/domains/dev.wis.community/public_html/docroot/core' < '/tmp/66ad2fef8579a.patch' patching file modules/media_library/media_library.module Hunk #1 FAILED at 216. 1 out of 1 hunk FAILED -- saving rejects to file modules/media_library/media_library.module.rej Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2022-03-30/media_library_pager_fix.patch Downloading https://packagist.org/downloads/ Downloading https://packages.drupal.org/8/downloads [200] https://packages.drupal.org/8/downloads [201] https://packagist.org/downloads/ In Patches.php line 331: [Exception] Cannot apply patch Issue #3272629: Media Library widget display doesn't ret urn to first page on applying filters (https://www.drupal.org/files/issues/ 2022-03-30/media_library_pager_fix.patch)! Exception trace: at /home/wis/domains/dev.wis.community/public_html/vendor/cweagans/composer-patches/src/Patches.php:331 cweagans\Composer\Patches->postInstall() at /home/wis/domains/dev.wis.community/public_html/vendor/composer/composer/src/Composer/EventDispatcher/EventDispatcher.php:215
- πΊπΈUnited States Steve Hanson
Ah - it comes from the composer.json in the varbase_core module -- but I'm not real clear on the best way to deal with this. I finally set composer-exit-on-patch-failure to false --- Updates now complete but 3 patches fail -
(Issue #3272629: Media Library widget display doesn't return to first page on applying filters)
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2022-03-30/media_library_pager_fix.p... βhttps://www.drupal.org/files/issues/2024-01-04/drupal-10-2-0--2023-12-26... β (Issue #3412378: Fix vertical tabs and media library styling issues within Dialog and Media Library Modal by Claro after the Drupal 10.2.0 Release)
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2024-01-04/drupal-10-2-0--2023-12-26... βApplying patches for drupal/security_review
https://raw.githubusercontent.com/Vardot/varbase-patches/patches/securit... (Issue #3463712: Fix fatal error when pressing Run checklist button)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/Vardot/varbase-patches/patches/securit... - π―π΄Jordan Rajab Natshah Jordan
Thanks, Steve, for posting more follow-ups on your difficulties with this issue.
- Please, have a look at β¨ Regression: RC releases have empty dist information Needs work , many projects are facing a caching issue, with code or patches
- Important to keep
composer-exit-on-patch-failure
astrue
to keep the right and secure code base. - Delete the
composer.lock
file in the project. - Released Varbase Patches 10.0.42 - which will be updated and released with all needed and updated patches
- πΊπΈUnited States Steve Hanson
I did delete composer.lock but it gets rebuilt again during the composer update and re-inserts the patches that will not apply.
- πΊπΈUnited States Steve Hanson
I thought I should let you know that all of these issues disappeared after I updated to the latest Varbase releases. It is no longer trying to apply these patches that do not work. So feel free to close this.
- π―π΄Jordan Rajab Natshah Jordan
Thanks, Steve, for letting us know.
I am happy that it's working now.
Closing this issue as peer your request - Status changed to Fixed
2 months ago 7:11am 16 September 2024