Dependencies affecting upgrade to v6.0

Created on 27 October 2022, about 2 years ago
Updated 22 May 2024, 6 months ago

Problem/Motivation

If the following modules are not installed - jquery_ui, jquery_ui_datepicker, jquery_ui_slider, jquery_ui_touch_punch

Steps to reproduce

drush cim
drush update db
drush cim
Following error message:
[warning] Invalid argument supplied for foreach() ConfigImportSubscriber.php:177
[warning] Invalid argument supplied for foreach() ConfigImportSubscriber.php:177
[warning] Invalid argument supplied for foreach() ConfigImportSubscriber.php:177
[warning] Invalid argument supplied for foreach() ConfigImportSubscriber.php:177
[error] Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization.
Unable to uninstall the jQuery UI Datepicker module since the Better Exposed Filters module is installed.
Unable to uninstall the jQuery UI Touch Punch module since the Better Exposed Filters module is installed.
Unable to uninstall the jQuery UI Slider module since the Better Exposed Filters module is installed.
Unable to uninstall the jQuery UI module since the Better Exposed Filters module is installed. in Drupal\Core\Config\ConfigImporter->validate() (line 759 of /app/htdocs/core/lib/Drupal/Core/Config/ConfigImporter.php).

In ConfigImportCommands.php line 360:

The import failed due to the following reasons:
Unable to uninstall the jQuery UI Datepicker module since the Better Exposed Filters module is installed.
Unable to uninstall the jQuery UI Touch Punch module since the Better Exposed Filters module is installed.
Unable to uninstall the jQuery UI Slider module since the Better Exposed Filters module is installed.
Unable to uninstall the jQuery UI module since the Better Exposed Filters module is installed.

Proposed resolution

Remove dependency in upgrade to have following modules enabled jquery_ui, jquery_ui_datepicker, jquery_ui_slider, jquery_ui_touch_punch

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: cannot reproduce

Version

6.0

Component

Code

Created by

🇬🇧United Kingdom fionad

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Merge request !29Update better_exposed_filters.info.yml → (Closed) created by immaculatexavier
  • 🇺🇸United States jnimchuk

    Yes, I have the same issue. When trying to update these modules to 2.0:

    * jQuery UI Slider 8.x-1.1
    * jQuery UI Datepicker 8.x-1.4
    * jQuery UI 8.x-1.6

    Composer won't upgrade because it is being used by Better Exposed Filters 6.0.3.

    WAITING FOR THIS TO BE FIXED SO THAT I CAN UPGRADE TO DRUPAL 10.

    John N

  • 🇺🇸United States bburg Washington D.C.

    Better Exposed Filters 6.0.3 does list dependencies for

        "drupal/jquery_ui": "^1.6",
        "drupal/jquery_ui_slider": "^2.0.0",
        "drupal/jquery_ui_touch_punch": "^1.0",
        "drupal/jquery_ui_datepicker": "^2.0"
    

    I was running into composer errors trying to install it, and the `--with-all-dependencies` flag wasn't working. But it did work when I installed both together in the same composer command:

    ddev composer require drupal/better_exposed_filters:~6.0.3 drupal/jquery_ui_slider:~2.0.0 --with-all-dependencies
    

    And for anyone who was as confused as I was, It also seems like the 2.0.0 version of jquery_ui_slider didn't include any of the non-updated files, and is essentially just an empty module with a composer.json and *.info.yml files, so i'm not sure how it's expected to function right now. There is an issue here 📌 Difference between 1.x and 2.x branches Active examining that.

  • 🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺

    Same issue there.
    The D10 ready status of this module seems wrong. Composer is blocking because of jquery_ui_slider.

  • 🇺🇸United States caspervoogt

    I am trying to update to Drupal 10 and can't, because Better Exposed Filters requires jquery_ui_slider 1.1, and that is not D10-ready. jquery_ui_slider 2.0.0 is D10- and D9-ready though. I think BEF's composer.json should require jquery_ui_slider 2.0.0 instead of 1.1.

  • 🇺🇸United States caspervoogt

    You're right, Berdir. Issue on my end I think; I had to completely remove BEF and jquery_ui_slider from code and re-run 'composer install' to ensure it replaced all the files, now it works. That is normally not something I need to do when working locally, so it threw me off.

  • 🇺🇸United States bburg Washington D.C.

    Just to reiterate, you can update these packages at the same time to get through inter-dependant packages, e.g:

    composer require drupal/better_exposed_filters:~6.0.3 drupal/jquery_ui_slider:~2.0.0 --with-all-dependencies
    

    And you will likely want to patch jquery_ui_slider, as that version of the module seems to incorrectly remove several files. See 📌 Difference between 1.x and 2.x branches Active

  • 🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺

    Really don't get what is happening:

    Problem 1
    - Root composer.json requires drupal/better_exposed_filters 6.0.x-dev -> satisfiable by drupal/better_exposed_filters[6.0.x-dev].
    - drupal/better_exposed_filters 6.0.x-dev requires drupal/jquery_ui_slider ^1.1 -> found drupal/jquery_ui_slider[dev-1.x, 1.1.0, 1.x-dev (alias of dev-1.x)] but it conflicts with your root composer.json require (^2.0).

    It keeps telling me that but I really don't get it because the code seems fine on the repo of better_exposed_filters. I tried to clear composer cache, delete modules, nothing works :(

            "drupal/better_exposed_filters": "6.0.x-dev",
            "drupal/jquery_ui_datepicker": "^2.0",
            "drupal/jquery_ui_slider": "^2.0",

    I am probably missing something but I do not understand what.

  • First commit to issue fork.
  • 🇺🇦Ukraine ankondrat4 Lutsk

    These changes will work as expected too. I think. Related issue #3210946

  • 🇨🇦Canada earthangelconsulting

    can confirm, #13 worked for me!

    (note: the following may help others, by making it more explicit, it is not intended as an alternate solution or anything)

    your error might be different but similar, depending on the order you updated the modules in.

    when i did this:

    composer require 'drupal/better_exposed_filters:^6.0'

    it only updated to 6.0.2, not 6.0.3, since jquery_ui_slider wasn't updated yet.

    then, when i did this:

    composer require 'drupal/jquery_ui_slider:^2.0'

    i got this error from composer:

      Problem 1
        - Root composer.json requires drupal/jquery_ui_slider ^2.0, found drupal/jquery_ui_slider[dev-2.x, 2.0.0, 2.x-dev] but these were not loaded, likely because it conflicts with another require.
      Problem 2
        - drupal/better_exposed_filters is locked to version 6.0.2 and an update of this package was not requested.
        - drupal/better_exposed_filters 6.0.2 requires drupal/jquery_ui_slider ^1.1 -> found drupal/jquery_ui_slider[dev-1.x, 1.1.0, 1.x-dev (alias of dev-1.x)] but it conflicts with your root composer.json require (^2.0).

    (as i said, if you tried those updates in the opposite order, you would probably get a different message but similar to above.)

    the solution, as #13 says, is simple, just do them at the same time:

    composer require drupal/better_exposed_filters:~6.0.3 drupal/jquery_ui_slider:~2.0.0 --with-all-dependencies

    thanks @bburg!

    ps: if you only have jquery_ui_slider installed because it's a "requirement" of better_exposed_filters, whether you are using controls of that type or not, then the patch that is mentioned in #13 isn't needed.

    otherwise... see #13 :-)

  • 🇺🇸United States stephenplatz

    I think this issue is fixed, since all of the dependencies for 6.0.3 have D10 releases.

  • Status changed to Closed: cannot reproduce 7 months ago
  • 🇺🇸United States smustgrave

    So not able to reproduce this on a local of 10.3 using latest BEF.

    If still an issue please reopen.

Production build 0.71.5 2024