Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When a image field has multiple values, the default behavior is supposed to be setting their TITLE as "[node title] image 0...n"
.
However in my case, titles are always "image 0...n" without a node title.
Looking into the code, I found this (galleryformatter.module l. 276)
if(strpos($entity->title, '<') !== FALSE) {
$item['title'] = strip_tags($entity->title);
}
Shouldn't it be like this though?
if(strpos($entity->title, '<') !== FALSE) {
$item['title'] = strip_tags($entity->title);
} else
$item['title'] = $entity->title;
This fixed the issue for me.
This is my first time posting an issue, I apologise in advance if I did anything incorrectly.
Comments
Comment #1
Manuel Garcia CreditAttribution: Manuel Garcia commentedYou are totally right. I've committed the fix giving you authorship of the patch. So you should see one commit to this project on your user profile page =)
Thank you!
Comment #2
kytom CreditAttribution: kytom commentedWow! I feel honoured, I wouldn't know how to pull off a commit myself... :) Thank you!