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.                            
--------------------------------------------------------------------------------
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

c.altosax created an issue. See original summary.

c.altosax’s picture

Issue summary: View changes
ashutosh ahirwal’s picture

Status: Active » Needs review
StatusFileSize
new3.04 KB
new33.11 KB

Providing Patch

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

dineshkumarbollu’s picture

Hi

I reviewed the patch it applied cleanly and upgarde status module shows 0 errors, I am created MR for this patch

Thanks.

dineshkumarbollu’s picture

Status: Needs review » Reviewed & tested by the community
tjtj’s picture

I 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

c.altosax’s picture

Category: Feature request » Task
Status: Reviewed & tested by the community » Needs review

I 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.

kushagra.goyal’s picture

StatusFileSize
new308.29 KB
new57.13 KB

After applied the patch issue got fixed and now successfully compatible with D10. Attached before and after screenshot for reference. Hence RTBC+1..

bcobin’s picture

I 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!

chike’s picture

@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.

bcobin’s picture

OK - 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!

lamp5’s picture

Status: Needs review » Needs work

Yeah, 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.

bcobin’s picture

I'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...

bcobin’s picture

Got 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!

bart lambert’s picture

I'm praying for a quick new beta version with above patch included so I can install it using Composer on D10.

kburakozdemir’s picture

The patch works for me. so RTBC+1..

c.altosax’s picture

I 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.

bart lambert’s picture

So still no new release available?

webengr’s picture

I 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?

bart lambert’s picture

It 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.

bart lambert’s picture

So still no new release available?

bcobin’s picture

I 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!

je1’s picture

After 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?

lamp5’s picture

Status: Needs work » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.