The default view image_gallery defines (image_gallery) has no URL set although the documentation says that this is required for views that provide a page.

Eg, from the views edit form:

Enter the URL to use for this view in the form of 'dir/dir'. Do not begin or end the URL with a /. Example: 'view/tracker'. This is required if providing a page view. You can also add $arg as a placeholder for arguments passed in the URL, for example 'user/$arg/tracker' or 'node/$arg/related'. Note that any arguments listed here will be required, even if they are listed as optional below. You do not need to list arguments at the end of the path. Do not try to use URLs such as taxonomy/term/$arg.

This bug in image_gallery was found by analysing a bug for nodewords: see #294475: array-flip not array-flipping. That issue has been fixed in nodewords, but this is still a bug in image_gallery I believe. Patch attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drewish’s picture

Status: Needs review » Fixed
FileSize
1002 bytes

It doesn't have a title either so I added one of those and committed the attached. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

joachim’s picture

Status: Closed (fixed) » Active

This patch was totally wrong, and broke galleries.
The gallery view is used as an embedded view by our own menu callback at /image.
Giving the view a path causes the view to override our path, and so no child galleries are shown.

This patch needs to be rolled back.

I'm not sure I understand the bug in nodewords. Having a path is not a required field for views that provide a page, as the page settings are used for when the view is embedded.
We could put in an unused path, like "views/image" (that's what I do on my production sites so I can see what a view is producing). Or nodewords could filter its array before trying to flip it.

joachim’s picture

Status: Active » Needs review

@sun: I'd like to roll this back ASAP.

sun’s picture

Version: 5.x-2.0-alpha2 » 5.x-2.0-alpha3
Status: Needs review » Active

Removed $view->url.

joachim’s picture

Status: Active » Closed (works as designed)

Marking this as by design, as the image gallery view is intended only for embedding.