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.
Dear colorbox module,
I use the colorbox trigger in views on a custom text with the Automatic generated Colorbox gallery option enabled. It will work when someone is not logged in. But when someone can edit the node in question, the colorbox module places 3 links, making it a total mess and loading the same item 3 times. It seems to give faulty behaviour when the trigger contains a link.
The views custom text trigger code:
<div class="hr_div">
<div class="views-field-field-thumbnail-image">[field_thumbnail_image]</div>
<div class="views-field-field-thumbnail-titel">[field_thumbnail_titel]</div>
<div class="views-field-field-thumbnail-view">see more</div>
<div class="views-field-field-thumbnail-edit">[edit_node]</div>
</div>
The correct html ouput code:
<a class="colorbox-inline init-colorbox-inline-processed-processed cboxElement" rel="gallery-portfolio_pages" href="/?inline=true#colorbox-inline-1">
<div class="hr_div">
<div class="views-field-field-thumbnail-image">
<div class="views-field-field-thumbnail-titel">hoera</div>
<div class="views-field-field-thumbnail-view">see more</div>
<div class="views-field-field-thumbnail-edit"></div>
</div>
</a>
The incorrect html output code:
<a class="colorbox-inline init-colorbox-inline-processed-processed cboxElement" rel="gallery-portfolio_pages" href="/?inline=true#colorbox-inline-1"></a>
<div class="hr_div">
<a class="colorbox-inline init-colorbox-inline-processed-processed cboxElement" rel="gallery-portfolio_pages" href="/?inline=true#colorbox-inline-1">
<div class="views-field-field-thumbnail-image">
<img width="219" height="153" alt="" src="http://bieroppeil.nl/sites/default/files/styles/thumbnail/public/portfolio/Jellyfish.jpg">
</div>
<div class="views-field-field-thumbnail-titel">hoera</div>
<div class="views-field-field-thumbnail-view">see more</div>
</a>
<div class="views-field-field-thumbnail-edit">
<a class="colorbox-inline init-colorbox-inline-processed-processed cboxElement" rel="gallery-portfolio_pages" href="/?inline=true#colorbox-inline-1"></a>
<a href="/node/10/edit?destination=taxonomy/term/2">edit</a>
</div>
</div>
Comments
Comment #1
frjo CreditAttribution: frjo commentedThe trigger field can not contain links, that will mess thing up.
Comment #2.0
(not verified) CreditAttribution: commentedCut the 1 sentence post in multiple sentences for readability and added some additional insights and information