Drupal 10 Compatibility fixes

Created on 23 March 2023, over 1 year ago
Updated 20 July 2023, over 1 year ago

Acquia's D10 Deprecation Status Page Reports very basic changes needed to become D10 compatible.

https://dev.acquia.com/drupal10/deprecation_status/projects/site_studio_...

I didnt see an automated D10 compatibility issue created for this module, nor do I know why such an issue was never created (maybe its because the module is covered by security advisory policy?

πŸ“Œ Task
Status

Fixed

Version

1.2

Component

Code

Created by

πŸ‡ͺπŸ‡¨Ecuador jwilson3

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

Comments & Activities

  • Issue created by @jwilson3
  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    Let's see if the bot will generate us a patch.

  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    Here is manual output of upgrade_status:analyze

     ddev drush upgrade_status:analyze ss_back_to_top_button
     [notice] Processing /var/www/html/docroot/modules/contrib/site_studio_back_to_top_button.
    
    ================================================================================
    Site Studio Back To Top Button, --
    Scanned on Thu, 03/23/2023 - 21:18
    
    FILE: modules/contrib/site_studio_back_to_top_button
    
    STATUS         LINE                           MESSAGE
    --------------------------------------------------------------------------------
    Check manually 0    The 'ss_back_to_top_button' extension is not installed.
                        Cannot check deprecated library use.
    --------------------------------------------------------------------------------
    
    FILE:
    modules/contrib/site_studio_back_to_top_button/templates/ss-back-to-top-button.h
    tml.twig
    
    STATUS         LINE                           MESSAGE
    --------------------------------------------------------------------------------
    Check manually 2    The 'ss_back_to_top_button/ss-back-to-top-button' library is
                        not defined because the defining extension is not installed.
                        Cannot decide if it is deprecated or not.
    --------------------------------------------------------------------------------
    
    FILE:
    modules/contrib/site_studio_back_to_top_button/ss_back_to_top_button.info.yml
    
    STATUS         LINE                           MESSAGE
    --------------------------------------------------------------------------------
    Check manually 0    Value of core_version_requirement: ^8 || ^9 is not
                        compatible with the next major version of Drupal core. See
                        https://drupal.org/node/3070687.
    --------------------------------------------------------------------------------
    
  • Status changed to Needs review over 1 year ago
  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    Patch fixed D10 compatibility.

    After applying patch and enabling module, I get zero issues with upgrade_status:

    ddev drush upgrade_status:analyze ss_back_to_top_button
     [notice] Processing /var/www/html/docroot/modules/contrib/site_studio_back_to_top_button.
    
    ================================================================================
    Site Studio Back To Top Button, --
    Scanned on Thu, 03/23/2023 - 21:29
    
    No known issues found.
    

    And no issues with mglaman/drupal-check:

    ❯ ddev exec php vendor/bin/drupal-check -d docroot/modules/contrib/site_studio_back_to_top_button
     2/2 [β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“] 100%
    
    
     [OK] No errors
    
    Thanks for using drupal-check!
    
    Consider sponsoring the development of the maintainers which make drupal-check possible:
    
    - phpstan (ondrejmirtes): https://github.com/sponsors/ondrejmirtes
    - phpstan-deprecation-rules (ondrejmirtes)): https://github.com/sponsors/ondrejmirtes
    - phpstan-drupal (mglaman)): https://github.com/sponsors/mglaman
    - drupal-check (mglaman)): https://github.com/sponsors/mglaman
    
  • πŸ‡ΊπŸ‡ΈUnited States davidloop

    Applying patch manually. Thanks!

  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    Unfortunately there is more work required that wasn't detected by Drupal rector and Drupal check, which focus on PHP compatibility only.

    There are errors in JS console on Drupal 10 installation related to jquery.once which was Deprecated in Drupal 10.

    Here is the change record with notes on how this should be refactored.

    https://www.drupal.org/node/3158256 β†’

    I see that the back_to_top β†’ Drupal module has 3.x version that has already taken on this challenge of doing a rewrite of their javascript to use modern vanilla js.

    In an ideal world, the suggested approach would be to convert the custom JS provided by this module to vanilla javascript so that the dependency on jQuery can be removed and convert to using the new drupal/once npm package. However, I believe Site Studio itself still relies heavily on jQuery for many things, plus this module uses animations to scroll to the top will make the rewrite in vanilla JS more difficult, but you might be able to borrow code from back_to_top, OR perhaps decide to switch gears and add that module as a dependency.

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States bakulahluwalia Houston

    Drupal 10 Compatibility added.

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

Production build 0.71.5 2024