Automated Drupal 10 compatibility fixes

Created on 18 July 2022, almost 2 years ago
Updated 7 September 2023, 10 months ago

Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 10.

To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects β†’

Periodically patches will be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted simply close this issue (any status besides Active, Needs review or Needs work) or remove the "ProjectUpdateBotD10" tag from the issue.

The patches will be posted by the Project Update Bot β†’ official user account. This account will not receive any issue credit contributions for itself or any company.

Proposed resolution

You have a few options for how to use this issue:

  1. Accept automated patches until this issue is closed

    If this issue is left open (status of Active, Needs review or Needs work) and the "ProjectUpdateBotD10" tag is left on this issue, new patches will be posted periodically if new deprecation fixes are needed.

    As the Drupal Rector project improves and is able to fix more deprecated API uses, the patches posted here will cover more of the deprecated API uses in the module.

  2. Leave open but stop new automated patches.

    If you want to use this issue as a starting point to remove deprecated API uses but don't want new automated patches simply leave this issue open but remove the "ProjectUpdateBotD10" tag from the issue.

    You can use Drupal Rector yourself to make these patches.

    If you want to receive automated patches again, add back the "ProjectUpdateBotD10" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review or Needs work) and no more automated patches will be posted here.

    If the issue is reopened, then new automated patches will be posted.

    If you are using another issue(s) to work on Drupal 10 compatibility it may be useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the patch in the comment by Project Update Bot β†’ .
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.

Providing feedback

If there are problems with one of the patches posted by the Project Update Bot β†’ , such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue β†’ . For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Infrastructure project issue queue β†’ using the component β€œBot: Drupal Rector”.

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

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

Comments & Activities

Not all content is available!

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

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • πŸ‡§πŸ‡ͺBelgium bart lambert

    Hi,

    I just update flexslider to the d10 compatible dev version. Unfortunately the Upgrade Status module refuses putting is d10 Compatible. 4 more issues are found . see attached file.

    Apparently there is still a little work left in order to get ik compatible

  • First commit to issue fork.
  • πŸ‡©πŸ‡ͺGermany sleitner

    @bart lambert : I cannot reproduce your issues. Did you use the merge request !4 in #7 ?

    tests/modules/flexslider_library_test/flexslider_library_test.info.yml needed version 10, too

    Please review the updated Merge request !4

  • πŸ‡§πŸ‡ͺBelgium bart lambert

    Hi,

    Thanks for pointing it out to me! I did not.
    Applied the patches and now it all works fine!

    Thanks!!!

    Maybe somebody could add an new version update.

  • πŸ‡¦πŸ‡ΊAustralia oshaunessy

    I applied the patches and manually updated the info.yml files to include version 10 and I got it to pass upgrade status and install on a version 10 site but it still didn't work.
    It was throwing .once JS errors because of jquery.once not being in version 10 (I had already changed dependencies from core/jquery.once to core/once but was still getting .once JS errors).
    I copied jquery.once from version 9 core to my theme JS folder, added jquery.once files to theme libraries.yml and then my flex slider block worked.

  • πŸ‡¦πŸ‡ΊAustralia oshaunessy

    I applied the patches and manually updated the info.yml files to include version 10 and I got it to pass upgrade status and install on a version 10 site but it still didn't work.
    It was throwing .once JS errors because of jquery.once not being in version 10 (I had alredy changed dependencies from core/jquery.once to core/once but was still getting .once JS errors).
    I copied jquery.once from version 9 core to my theme JS folder, added jquery.once files to theme libraries.yml and then my flex slider block worked.

  • πŸ‡ΉπŸ‡­Thailand manarak

    I patched my installation of flexslider on my Drupal 10 site and no slides appear.

    all slides ( li ) remain on "display: none".

    I get no javascript/jquery errors.

    I tried #13 but it didn't help.

    It seems the jquery doesn't get executed. what else can I look into ?

  • πŸ‡ΊπŸ‡ΈUnited States bill_redman

    I am not very well versed in applying patches and merge requests so I'm a bit confused reading this thread.

    @bart lambert writes that he applied the patches. Are those the patches in #2 or #3 or both or neither?

    @sleitner writes Did you use the merge request !4 in #7. What does that mean? Can a merge request be applied like a patch?

    Any guidance would be much appreciated.

  • πŸ‡©πŸ‡ͺGermany sleitner

    @bill_redman You can download a patch file from the merge request: "Code" button -> Download plain diff and apply it

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    Composer require-dev failure
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.5 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    Composer require-dev failure
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    Composer require-dev failure
  • πŸ‡©πŸ‡ͺGermany sleitner

    Removed core:8.x in all submodules

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    Composer require-dev failure
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.5 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    Composer require-dev failure
  • πŸ‡ΊπŸ‡ΈUnited States bill_redman

    @sleitner - Thank you for answering my question. Each day, learn a little bit more.

  • πŸ‡§πŸ‡ͺBelgium bart lambert

    @bill_redman : I applied all changes under "Merge request4!"

  • πŸ‡ΊπŸ‡ΈUnited States bill_redman

    @bart lambert - Thanks, the changes under merge request !4 are what I applied when I said 'the patch'.

  • Assigned to Rishi Kulshreshtha
  • Status changed to Needs work about 1 year ago
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • The arrow function () => { ... } used in the code was replaced with a regular function function() { ... }. This change was made to ensure compatibility with older versions of JavaScript or libraries that may not support arrow functions.
    The element selection within the once function was updated. Previously, $(once("flexslider", #${id}, context)) was used to select elements, but it was changed to $(this) to refer to the current element being processed. This change allows for better clarity and ensures that the correct elements are targeted for manipulation.

    This is now ready to be tested!

    https://git.drupalcode.org/project/flexslider/-/merge_requests/4.diff

  • @Rishi Kulshreshtha, changes from comment #22 works as expected.

  • Status changed to RTBC about 1 year ago
  • πŸ‡©πŸ‡ͺGermany sleitner

    changes from comment #22 work as expected.

  • Can't get the patch from diff to apply.

  • Some sort of composer issue. Now the patch applies, but I am requiring the tag, and composer is grabbing dev...

    But at least the patch works.

    ddev composer require 'drupal/flexslider:^2.0'
    ./composer.json has been updated
    Running composer update drupal/flexslider
    Gathering patches for root package.
    Removing package drupal/flexslider so that it can be re-installed and re-patched.
      - Removing drupal/flexslider (dev-2.x 6d1ae5f)
    Deleting /var/www/html/web/modules/contrib/flexslider - deleted
    Loading composer repositories with package information
    Warning from https://packages.drupal.org/lenient: The Drupal lenient endpoint has been deprecated and does not support Drupal 10. Use mglaman/composer-drupal-lenient. See https://www.drupal.org/composer/lenient for more information.
    Info from https://repo.packagist.org: #StandWithUkraine
    Updating dependencies
    Nothing to modify in lock file
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 1 install, 0 updates, 0 removals
      - Syncing drupal/flexslider (dev-2.x 6d1ae5f) into cache
    Gathering patches for root package.
    Gathering patches for dependencies. This might take a minute.
      - Installing drupal/flexslider (dev-2.x 6d1ae5f): Cloning 6d1ae5f3ba from cache
      - Applying patches for drupal/flexslider
        https://git.drupalcode.org/project/flexslider/-/merge_requests/4.diff (D10-2)
    
    Generating autoload files
    101 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    phpstan/extension-installer: Extensions installed
    Not scaffolding files for drupal/flexslider, because it is not listed in the element 'extra.drupal-scaffold.allowed-packages' in the root-level composer.json file.
    No security vulnerability advisories found
  • πŸ‡©πŸ‡ͺGermany sleitner

    @amaria, @minorOffense, @ryanwebpage, @ClassicCut, @spotzero please get a D10 version released.

  • First commit to issue fork.
  • πŸ‡¨πŸ‡¦Canada minorOffense Ottawa, Canada

    Before merging any D10 changes I want to drop support for D8 and remove some references to jquery easing (they can't work in D9+).

    I created an MR into the branch Rishi created.

    I don't have an environment to test it in at the moment.

  • Status changed to Needs review 11 months ago
  • πŸ‡¨πŸ‡¦Canada minorOffense Ottawa, Canada
  • @minoroffense opened merge request.
  • Status changed to RTBC 10 months ago
  • πŸ‡©πŸ‡ͺGermany sleitner

    +1 RTBC

  • πŸ‡±πŸ‡ΉLithuania vibrasphere

    I'd like to confirm that patch #25 works perfectly with latest Drupal 10 verison using https://github.com/mglaman/composer-drupal-lenient

  • πŸ‡¬πŸ‡§United Kingdom Londova

    Hello,
    is that possible to get a D10 new version released?
    Thanks

  • πŸ‡ΊπŸ‡ΈUnited States lebachai

    I am also hoping for an official release for D10 soon. Thank you

  • πŸ‡¬πŸ‡§United Kingdom Londova

    @minorOffense
    Could you please release a new D10 version of the module?
    2 month already passed from the last updates...

  • Status changed to Fixed 10 months ago
  • πŸ‡¨πŸ‡¦Canada minorOffense Ottawa, Canada
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024