I keep getting this error "Custom gallery must only contain lowercase letters, numbers, hyphen and underscores."

yet the name i am trying to use is gallery-field_category.

As far as I can tell i am using only lowercase, hyphens and underscores... so why I am getting this error that prevents me from entering my custom category? I get the same error in both 2.5 and 2.x-dev. Thanks for your help. cheers kevin

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frjo’s picture

Assigned: Unassigned » frjo
FileSize
749 bytes

Can confirm this validation bug. Please try out his patch, I believe it fixes the problem.

pyxio’s picture

Thanks. I confirm this patch works for solving the validation issue. However, colorbox custom field image grouping does not seem to be working. The gallery still shows all photos instead of the ones limited by the custom field.

Use case - I have terms attached to photo nodes. When opening a photo in colorbox gallery i only want to be able to see images using the same term in the slideshow. This field is called field_category. I have tried both gallery-field_category and field_category. But it doesn't work.

Perhaps I should move this to another issue? Cheers Kevin

frjo’s picture

Title: Bug in custom category field » Bug in custom gallery setting validation
Status: Active » Fixed

Committed patch to 7.x-2.x. Thanks for reporting and testing!

The custom gallery field has no token support (only the custom caption field has that). No one has asked for that yet I believe.

If you like to make an feature request for that please do so in a separate issue.

Status: Fixed » Closed (fixed)

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

Anybody’s picture

@drupalstrap: Have you created a feature request for that? It would make a lot of sense and would be very helpful. We should link it as related here if it exists.

Anybody’s picture

Sorry but I have to reopen this because the patch is
1. incorrect
2. completely missing in the latest 7.x-2.x versions (stable and dev)

Furthermore the functionality to use tokens in the custom field described in #2 makes a lot of sense. Without it the whole custom functionality will not be helpful in most cases.

So I created a new patch based on #1 which fixes this and adds the functionality to use tokens in that field.

Please review.

Anybody’s picture

FileSize
1.25 KB