colorbox doesn't display Alt and Title when only one image is displayed

Created on 4 February 2023, over 1 year ago
Updated 16 May 2023, about 1 year ago

Hi

I use slick media field in my content type, Media switcher set 'Image to colorbox' and Lightbox caption set 'Alt text'.
when I upload over one image in a node, click the image , the alt text displayed correctly in the popup image lightbox,
but when only upload one image in a node, click the image,the alt text doesn't show up.

Does anyone meet the same situation and have solution?

💬 Support request
Status

Fixed

Version

2.4

Component

Miscellaneous

Created by

🇹🇼Taiwan ss750006

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

Comments & Activities

  • Issue created by @ss750006
  • 🇮🇩Indonesia gausarts

    Thank you.

    Slick self-destructs when given one item. The markup is also simplified to avoid annoyingly moving slide when only one issue. It is likely breaking other things, not necessarily the markups, but might be the required CSS classes.

    The lightbox markup is something else, not related to Slick's. It was Blazy's, and checked here:
    https://git.drupalcode.org/project/blazy/-/blob/8.x-2.x/js/components/jq...

    I haven't been able to dig it enough, but mind screenshoting the HTML markups, starting from A tag containing the lightbox trigger, along with the next element named .litebox-caption, if present?

  • 🇹🇼Taiwan ss750006

    Hi Gausarts
    Thanks for your reply!
    I tried to set my field type to format to Blazy and it show the alt text when only one item.
    But I need to reset my image wall style 😂
    so I suggest my client to upload at least 2 images in one node

  • Issue was unassigned.
  • Status changed to Fixed about 1 year ago
  • 🇮🇩Indonesia gausarts

    > I tried to set my field type to format to Blazy and it show the alt text when only one item.

    Got it, thanks.

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

Production build 0.69.0 2024