By default, the Galleria module returns an error if a Galleria-enabled node has both image and non-image attachments. However, some webmasters will want to add non-image attachments but still have a Galleria generated from any images that are attached.

Here's a patch that changes the module's node-validation to pass if there is at least one image attached, rather than if there are only images attached. When the page is being generated, the module simply skips any non-image attachments.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mark Theunissen’s picture

Status: Needs review » Fixed
FileSize
2.58 KB

I have made some minor mods (to the function, and using a DEFINE instead of global variable).

Final patch attached. Committed to DRUPAL-6--1. Thanks!

eromba’s picture

It looks like this patch causes a tiny conflict with the commit for #425840: Unexpected behavior with single-image Gallerias. The file count that determines whether or not to print the previous/next links should not include files that are skipped. The fix for the head branch is attached.

eromba’s picture

Version: 6.x-1.0-beta4 » 6.x-1.x-dev
Status: Fixed » Needs review
Mark Theunissen’s picture

Status: Needs review » Fixed

Fixed in dev.

Status: Fixed » Closed (fixed)

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