Juicebox Gallery does not work with views in drupal 10.3.5

Created on 29 September 2024, about 2 months ago

The gallery, which I created with the views module, results in the message "The website encountered an unexpected error. Try again later", with the log "typeError: Drupal\juicebox\JuiceboxFormatter::styleImageSrcData(): Argument #1 ($image_file) must be of type Drupal\file\FileInterface, null given, called in /modules/contrib/juicebox/src/Plugin/views/style/JuiceboxDisplayStyle.php on line 291 in Drupal\juicebox\JuiceboxFormatter->styleImageSrcData() (line 313 of /modules/contrib/juicebox/src/JuiceboxFormatter.php)."

Please, does anyone have any ideas for a solution?

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡§πŸ‡·Brazil muzplay

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

Comments & Activities

  • Issue created by @muzplay
  • πŸ‡ΊπŸ‡ΈUnited States fkelly

    I believe that this problem was resolved in:

    https://www.drupal.org/project/juicebox/issues/3318067 πŸ› Call to a member function isDisplayed() on null error Fixed

    and a change was committed to 4.0.x. You list 4.0.0-alpha1 in your bug report.

    You might want to replace 4.0.0-alpha with 4.0.x and see if that resolves the problem. The composer require for this looks like:

    composer require 'drupal/juicebox:4.0.x-dev@dev' single or double quotes depending on your operating system

    This project is not being actively maintained. Personally, I am spending my time looking at alternatives.

  • πŸ‡§πŸ‡·Brazil muzplay

    Frank Kelly, thank you very much. However, version 4.0.x-dev did not work.

    It is curious that the Juicebox field formatter works perfectly. But the Juicebox views style plugin does not work.

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

    In the root directory of 4.0.x our principal maintainer wrote a program called juicebox.install. You might want to run that "manually" ... it should be run as part of updating to 4.0.x. It fixes some problems with image types that may be inherited from older Juicebox versions.

    A year ago when we more actively debugging Juicebox, Luke (the maintainer) wrote this. I don't fully understand what's going on with it but I know that I was running into bugs I couldn't pin down and the program fixed them. Worth a try. I'm concentrating my efforts on finding an alternative to Juicebox.

Production build 0.71.5 2024