Problem/Motivation

Release https://www.drupal.org/project/better_exposed_filters/releases/6.0.x-dev is supposed to work with Drupal 10 according to release notes. However, it has a dependency on jquery_ui that doesn't have a Drupal 10 release.

Steps to reproduce

composer require drupal/better_exposed_filters on a Drupal 10 project.

We should either remove Drupal 10 support here of add Drupal 10 support in jquery_ui.

CommentFileSizeAuthor
#15 3315668-jquery-dep.patch405 bytesrfmarcelino
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

Graber created an issue. See original summary.

podarok’s picture

Status: Active » Needs work

Agreed
We are not going to remove Drupal 10 support
Let's work on getting jquery_ui working in Drupal 10

kmonty’s picture

I would suggest the effort should go to removing jquery_ui as a requirement. jquery_ui is near its end-of-life and isn't a useful tool in the modern web ecosystem -- it would be great if BEF wasn't requiring borderline unmaintained code anymore :)

nick hope’s picture

We now have release 2.0.0 of jQuery UI Slider with D10 compatiblity, meaning all the BEF dependencies now have D10 compatible releases.

There is also a new 2.0.0 release of jQuery UI Datepicker, although the 8.x-1.4 does already have D10 compatiblity. But, assuming those 2 new releases don't break anything, I guess that in the composer.json for the BEF 6.X.X branch, this...

    "drupal/jquery_ui": "^1.4",
    "drupal/jquery_ui_slider": "^1.1",
    "drupal/jquery_ui_touch_punch": "^1.0",
    "drupal/jquery_ui_datepicker": "^1.2"

...should become this...

    "drupal/jquery_ui": "^1.4",
    "drupal/jquery_ui_slider": "^2.0",
    "drupal/jquery_ui_touch_punch": "^1.0",
    "drupal/jquery_ui_datepicker": "^2.0"
sadikyalcin’s picture

Need the requirements upgraded as mentioned on #4. Users who have `jquery_ui_datepicker` upgraded won't be able to update BEF.

Problem 1
    - Root composer.json requires drupal/better_exposed_filters ^6.0 -> satisfiable by drupal/better_exposed_filters[6.0.1, 6.0.2, 6.0.x-dev].
    - drupal/better_exposed_filters[6.0.1, ..., 6.0.x-dev] require drupal/jquery_ui_datepicker ^1.2 -> found drupal/jquery_ui_datepicker[dev-1.x, 1.2.0, 1.3.0, 1.4.0, 1.x-dev (alias of dev-1.x)] but it conflicts with your root composer.json require (^2.0).

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

nicxvan’s picture

I tested these updates locally and everything was working, I had a duplicate issue with a similar pr.

Jquery ui is now working with D10 I'm going to update the mr with that version requirement.

maxilein’s picture

Will you please also add that to an updated version? Thank you

nicxvan’s picture

@maxilein I'm not sure what you are asking for

maxilein’s picture

There are lot's problems with dependencies that prevent an upgrade to D10, because bef dependencies cannot be upgraded, because of bef ...
e.g. Dependencies affecting upgrade to v6.0 https://www.drupal.org/project/better_exposed_filters/issues/3317774

So this issue seems important.

lomale@bluewin.ch’s picture

Version: 6.0.x-dev » 6.0.2

Hi i was able to update to Drupal 9.5.0 from 9.4.8

now I have in the Available updates

jQuery UI Datepicker 8.x-1.4 Up to date Ok
Also available:2.0.0 (2022-Dec-12)

jQuery UI Slider 8.x-1.1 Up to date Ok
Also available:2.0.0 (2022-Dec-12)

[web34@s93] 2 $ composer require 'drupal/jquery_ui_datepicker:^2.0'
./composer.json has been updated
Running composer update drupal/jquery_ui_datepicker
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires drupal/jquery_ui_datepicker ^2.0, found drupal/jquery_ui_datepicker[2.0.0] 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_datepicker ^1.2 -> found drupal/jquery_ui_datepicker[1.2.0, 1.3.0, 1.4.0] but it conflicts with your root composer.json require (^2.0).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
[web34@s93] 2 $ composer require 'drupal/jquery_ui_slider:^2.0'
./composer.json has been updated
Running composer update drupal/jquery_ui_slider
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires drupal/jquery_ui_slider ^2.0, found drupal/jquery_ui_slider[2.0.0] 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[1.1.0] but it conflicts with your root composer.json require (^2.0).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

I get these errors, and I have no idea. can someone help.
Thanks.

nick hope’s picture

Version: 6.0.2 » 6.0.x-dev

@lomale@bluewin.ch We have to leave jQuery UI Datepicker and jQuery UI Slider at their 1.X versions until a new version of BEF is released that requires them at their 2.X versions. If it's urgent because of the dependencies of your other modules then you could make a patch and include it in your composer.json.

vladimiraus’s picture

With jQuery UI Datepicker:1.x, 6.x branch of the module is not compatible with Drupal 10.
It's important now (since Drupal 10 is stable) to remove the false claim about Drupal 10 support in the 6.x branch.

We either need to

  • update 6.x branch to support jQuery UI Datepicker 2.x and Drupal 10
  • OR update 6.x branch to remove D10 support and create 7.x branch to support Drupal 10 and jQuery UI Datepicker 2.x
rfmarcelino’s picture

StatusFileSize
new405 bytes

@nick-hope, the patch (attached) won't do any difference since it runs after the composer checks the dependencies from the sources.
I agreed with @vladimiraus, as is, the module is not Drupal 10 compatible. If you're concerned with backward compatibility, we could have a 7.x with the new dependencies and bump the core requirements.

You may add this to your composer.json to make it work until we have a solution:

"repositories": [

                {
            "type": "git",
            "url": "https://git.drupalcode.org/issue/better_exposed_filters-3315668.git"
        },

and then run
composer require drupal/better_exposed_filters:dev-dev-3315668-drupal-10-compatibility

podarok’s picture

Version: 6.0.x-dev » 6.0.3
Status: Needs work » Fixed

Thanks, tagged

Status: Fixed » Closed (fixed)

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

andras_szilagyi’s picture

Nobody noticed the failing test in D10?

nicole.harnish’s picture

This wont work as "Because patching occurs after Composer calculates dependencies and installs packages, changes to an underlying dependency’s composer.json file introduced in a patch will have no effect on installed packages."

https://drupal.stackexchange.com/a/277858

My apologies - my project had the dependancies it its own composer.json so removed and was able to get BEF updated and allow it to control the version

alienzed’s picture

A bit confused, as I seem to be blocked from upgrading. How is this marked as compatible with D10 if I cannot effectively install it's dependencies using composer?

inversed’s picture

For anyone having trouble getting to 6.0.3, this is the command I used. Essentially, I needed to update the out of date supporting jquery_ui dependencies at the same time as BEF.

composer require drupal/better_exposed_filters:^6.0.3 drupal/jquery_ui_datepicker:^2.0 drupal/jquery_ui_slider:^2.0 -W

Otherwise, I kept ending up on BEF 6.0.2 which does not include the fix from this issue. I had those packages required specifically so they were locked and composer was not able to update BEF, even when specifying the with-all-dependencies argument.

awasson’s picture

Thanks @inversed #21,

Perhaps a maintainer can post that suggestion to the module page under preparing for Drupal 10 to save time and frustration for those running into this issue.

I too have run into it multiple times in the last weeks while preparing sites for upgrading D9 -> D10

I've been editing composer.json manually for:

"drupal/better_exposed_filters": "^6.0.3",
"drupal/jquery_ui_datepicker": "^2.0",

Then composer update.

I think your method is a cleaner way to do it.

Cheers,
Andrew

joe huggans’s picture

#21 - legendary, thank you!

adilsarwar1’s picture

I was trying to update to Drupal 10. but the issue was of BEF and jQuery UI Slider compatibility. I manually updated the following lines in composer file and then run the composer update command.
- "drupal/better_exposed_filters": "^6.0.3"
- "drupal/jquery_ui_datepicker": "^2.0"
- "drupal/jquery_ui_slider": "^2.0"

after running composer update command both the modules updated successfully.

kris77’s picture

#21 works for me too.

Thanks @inversed