Problem/Motivation
Currently, Field Slideshow only supports Drupal 8 and 9. A Drupal 10 compatible version is required, as Drupal 9 reaches EOL in November 2023.
Upgrade_status lists 3 issues:
$ drush upgrade_status:analyze field_slideshow
[notice] Processing /home/awardsun/drupal9/web/modules/contrib/field_slideshow.
================================================================================
Field Slideshow, 8.x-3.0-beta2
Scanned on Wed, 03/22/2023 - 22:00
FILE:
web/modules/contrib/field_slideshow/src/Plugin/Field/FieldFormatter/FieldSlidesh
ow.php
STATUS LINE MESSAGE
--------------------------------------------------------------------------------
Check manually 505 Call to deprecated function file_create_url(). Deprecated in
drupal:9.3.0 and is removed from drupal:10.0.0. Use the
appropriate method on
\Drupal\Core\File\FileUrlGeneratorInterface instead.
--------------------------------------------------------------------------------
FILE: web/modules/contrib/field_slideshow/field_slideshow.libraries.yml
STATUS LINE MESSAGE
--------------------------------------------------------------------------------
Check manually 0 The 'field_slideshow.cycle2' library is depending on a
deprecated library. The core/jquery.once asset library is
deprecated in Drupal 9.3.0 and will be removed in Drupal
10.0.0. Use the core/once library instead. See
https://www.drupal.org/node/3158256
--------------------------------------------------------------------------------
FILE: web/modules/contrib/field_slideshow/field_slideshow.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.
--------------------------------------------------------------------------------
Comments
Comment #2
c.altosax commentedComment #3
ashutosh ahirwal commentedProviding Patch
Comment #6
dineshkumarbollu commentedHi
I reviewed the patch it applied cleanly and upgarde status module shows 0 errors, I am created MR for this patch
Thanks.
Comment #7
dineshkumarbollu commentedComment #8
tjtj commentedI got an error after applying ther patch and trying to use the slideshow setting for image display
Message ArgumentCountError: Too few arguments to function Drupal\image\Plugin\Field\FieldFormatter\ImageFormatter::__construct(), 9 passed in /home/public_html/web/modules/custom/field_slideshow/src/Plugin/Field/FieldFormatter/FieldSlideshow.php on line 98 and exactly 10 expected in Drupal\image\Plugin\Field\FieldFormatter\ImageFormatter->__construct() (line 75 of /home/public_html/web/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php).
When I change the field to type "slideshow" it sits there with the wheel spinning
Comment #9
c.altosax commentedI added a commit addressing the PHP error that tjtj mentioned, and also addressed the JS error "$(...).once is not a function."
After making these changes, I can change the field formatter to "Slideshow" and it displays as expected in Drupal 10.
Comment #10
kushagra.goyal commentedAfter applied the patch issue got fixed and now successfully compatible with D10. Attached before and after screenshot for reference. Hence RTBC+1..
Comment #11
bcobin commentedI have a 9.5.10 site that depends on this module that I'm trying to upgrade to Drupal 10 - I'm assuming that I need to access the forked version at https://git.drupalcode.org/issue/field_slideshow-3341466/-/tree/3341466-... and select the 3341466-drupal-10-compatibility branch.
(I also assume that I would need to manually change the entry in the "require" section of my composer.json from "drupal/field_slideshow": "^3.0@beta", to "drupal/field_slideshow:^3.x'",)
But when I try to download, I get "Unsupported GitLab operation." I don't even know if downloading would work; I'm not familiar with Git and have been handling everything via composer install.
I am totally lost here. Can anyone provide some guidance on what I need to do to get this working in 9.5.10 so that I can successfully upgrade to Drupal 10? Composer install, uploading a file - whatever would work. Any guidance greatly appreciated... thanks in advance!
Comment #12
chike@bcobin as the patch here is working (I haven't tried it myself) just patch the module for D10. Use the Composer Drupal Lenient plugin to install the module in D10 and then patch it.
Comment #13
bcobin commentedOK - I've managed to install and patch the module, as well as applying the changes from:
https://git.drupalcode.org/project/field_slideshow/-/merge_requests/3/di...
I still get the spinning wheel.
Here's the log error:
Message Warning: Undefined variable $file_url_generator in Drupal\field_slideshow\Plugin\Field\FieldFormatter\FieldSlideshow->__construct() (line 98 of /[site]/web/modules/contrib/field_slideshow/src/Plugin/Field/FieldFormatter/FieldSlideshow.php)
Any ideas? Any help greatly appreciated!
Comment #14
lamp5Yeah, the reason is that this MR is not working because authors did not test it. I reported 2 issues to fix, to make it works.
Comment #15
bcobin commentedI'll offer a bounty to get this fixed if it'll help - it's the one issue that's holding up a D10 site launch.
Standing by hopefully...
Comment #16
bcobin commentedGot it - I neglected inserting some of the lines from the 575d85d2 commit.
Thanks for the work done here - a few other fixes and I'm ready to launch!
Comment #17
bart lambert commentedI'm praying for a quick new beta version with above patch included so I can install it using Composer on D10.
Comment #18
kburakozdemir commentedThe patch works for me. so RTBC+1..
Comment #19
c.altosax commentedI am currently using the patch that I provided on our production site. So yes I tested it. :)
Unfortunately I have limited time to work on Drupal things, so I likely won't be able to contribute further to this issue. @Lamp5 if you see issues with the code that I submitted, please feel free to correct them. I won't be offended.
Comment #20
bart lambert commentedSo still no new release available?
Comment #21
webengr commentedI am looking at the bg_layout module also for another task, and the author recommended https://www.drupal.org/project/imagefield_slideshow which seems similar, may want to look at that project for a field slideshow?
Comment #22
bart lambert commentedIt is indeed similar but what i'm missing is the possibility for a colorbox with bigger pictures that can popup when you click in on the image field.
Comment #23
bart lambert commentedSo still no new release available?
Comment #24
bcobin commentedI did an upgrade to 10.3.1 and now I get the following error (and page crash) upon viewing a node:
ArgumentCountError: Too few arguments to function Drupal\image\Plugin\Field\FieldFormatter\ImageFormatter::__construct(), 9 passed in [site]/web/modules/contrib/field_slideshow/src/Plugin/Field/FieldFormatter/FieldSlideshow.php on line 98 and exactly 10 expected in Drupal\image\Plugin\Field\FieldFormatter\ImageFormatter->__construct() (line 76 of [site]/web/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php).
Does anybody have any ideas here? Thanks in advance!
UPDATE: The patches in comment #8 didn't get applied in the cloned site that I was reporting on; once the updates were made, it all works fine... thanks!
Comment #25
je1 commentedAfter applying the patch, "composer update --ignore-platform-reqs --dry-run"
Your requirements could not be resolved to an installable set of packages.
Problem 1
drupal/field_slideshow 3.0.0-beta2 requires drupal/core ^8 || ^9 -> satisfiable by drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev].
Any idea how to get composer to work with patch?
Comment #26
lamp5