Hi I am using Node Gallery 7.x-1.1 and colorbox 7.x 2.8
The images load in the color box and so. For some reason I cannot get the [file:field_file_image_title_text] to show in the color box (this is the Title of the image ).. all of the other tokens work fine!
Please for any advice, thanks
settings shown in the attached where I have a test with the [file:type] which works.

Comments

masipila’s picture

I'm having the same issue. Subscribing.

masipila’s picture

I investigated this a bit and I believe that the reason for this behavior is as follows:

  • On Manage Items tab, we set the desired title for each gallery item. The form is "node_gallery_api_manage_items_form"
  • The submit handler for this form will call the batch operations. The batch job will set the given title to the Gallery Item node
  • However, the token [file:field_file_image_title_text] (provided by file_entity module) is taking the value from the File, not from the Gallery Item node
  • If you look at the actual file at admin/content/file, the title and alt fields of the file are empty. That's why the token is returning an empty value.

I believe the best way to fix this issue would be to make sure that we copy the Title value to both Gallery Item node (this is what is already happening) and to the File title field.

Cheers,
Markus

masipila’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new941 bytes

Please find attached a patch against the latest 7.x-1.x-dev

With this patch, the *file titles* will be overwritten wit the titles from *Manage Items* form. After this, the file titles are no longer empty for newly uploaded images and therefore [file:field_file_image_title_text] token will return a value.

Note that if you go to edit an individual Gallery Item Node and change the title, it will not update the file title.

Cheers,
Markus

killah89’s picture

How did you make it to work with colorbox? I follow the instructions here: https://www.drupal.org/node/1913810#comment-9368113

Can't get it to work. I uninstall Node Gallery and reinstall the 7.x-1.0 because before i had 7.x-1.1. Still it dont work.

Can anyone help me? Colorbox only appear on sngle file display, not in gallery. I mean "/file/number/" then colorbox open on click.

Sorry for my bad english hope someone can understand me.