Hi,
I upgraded my image module from from 1.6 to 2.x-dev, after that gallery images don't show up, and it always says "There are no images in this gallery."
I tried creating a new gallery and images from scratch but the issue didn't solve.
Any idea?
PS: it was fully functional before upgrade.

CommentFileSizeAuthor
#4 image_gallery_207198.patch649 bytesdrewish

Comments

sinasalek’s picture

Assigned: Unassigned » sinasalek
Status: Active » Closed (fixed)

I edited the new view called image_gallery and it throw an error telling that "Taxonomy: Vocabulary Name is not selected", i selected "image galleries" vocabulary and saved it and issue solved. since the vocabulary name in 1.6 is "image galleries", and also in 2.x. i think it's a good idea to auto select it by default in view. so users will not confuse.
I thinks it's some king of bug, so changed the status to closed not fixed.

Anyway thanks for the great module :)

drewish’s picture

Status: Closed (fixed) » Active

we need to add some code to the default gallery view so that it selects the correct taxonomy by default.

marked http://drupal.org/node/207212 as a duplicate

joachim’s picture

Looking at the code for the default view, the vocab is set by ID, not name:

    array (
      'tablename' => 'term_data',
      'field' => 'vid',
      'operator' => 'AND',
      'options' => '',
      'value' => array (
  0 => '1',
),

A quick test of importing a similar view with " 0 => 'Image Galleries'," instead works -- so the Views module allows either a vocab ID or name.
So that would work as a quick fix -- but if the user has changed the name...

drewish’s picture

Status: Active » Needs review
StatusFileSize
new649 bytes

we can call _image_gallery_get_vid() to get the vid, it'd also have the side effect of making sure the gallery vocabulary was created. something like this?

joachim’s picture

Status: Needs review » Active

Yup, that works.
But on the test site I just made for this I had to clear the Views cache.

Dunedan’s picture

I got the same problem. I also got a error message during the database update. Here's the whole error:

The following queries were executed
image module
Update #5200

* CREATE TABLE {image} ( `nid` INTEGER UNSIGNED NOT NULL, `fid` INTEGER UNSIGNED NOT NULL, `image_size` VARCHAR(32) NOT NULL, PRIMARY KEY (`nid`, `image_size`), INDEX image_fid(`fid`) ) /*!40100 DEFAULT CHARACTER SET utf8 */;
* Failed: INSERT INTO {image} SELECT DISTINCT f.nid, f.fid, f.filename FROM {files} f INNER JOIN {node} n ON f.nid = n.nid WHERE n.type='image' AND f.filename IN ('_original', 'thumbnail', 'preview', 'gallery', 'sidebar')
* DELETE FROM {file_revisions} WHERE EXISTS (SELECT * FROM {image} WHERE {image}.fid = {file_revisions}.fid)

Update #5201

* No queries

drewish’s picture

Dunedan, that's not related to this patch but I'm guessing you're using and old version of MySQL aren't you? Like 4.0?

LuRcH@www.daihatsu-drivers.co.uk’s picture

I also ended up getting the same error as Dunedan so have switched back to Image 1.6

yngens’s picture

Since drewish noted irrelevance to this issue, I have created new ticket for the
* Failed: INSERT INTO error at http://drupal.org/node/207557

drewish’s picture

Status: Active » Fixed

marked http://drupal.org/node/208013 as a duplicate

committing this to DRUPAL-5--2

joachim’s picture

Should we put in something that clears the views cache?
I've seen Event module has a call to something like that in its default view thing, but other modules with views don't, so I've no idea on the advisability of it.

mwpeters’s picture

Just thought I'd note that this happened to me when I upgraded to the Jan 6th version of 5.x-2.x-dev from previous release of "dev" code.

I reverted back to the older "dev" version and all seems "OK" again.

drewish’s picture

new installs will be fine. people who had the pre-patch version will need to manually clear the views cache.

fasdalf@fasdalf.ru’s picture

Status: Fixed » Active

New installs aren't OK because there is NO image_gallery/views_defaults.inc AT ALL in atchive.
And upgrade from 1.5 still fails.

drewish’s picture

Status: Active » Postponed (maintainer needs more info)

fasdalf@fasdalf.ru, i just downloaded the current image-5.x-2.x-dev.tar.gz file and it does in fact contain a contrib/image_gallery/views_defaults.inc file. perhaps you downloaded it before it'd been rebuilt to incorporate the changes?

popestepheng’s picture

I have this problem too

when I go into a gallery that has images, it says "There are no images in this gallery.", but I know there are because the galley said it had 5 images before I followed the link.

But when I go to views in order to try and find the taxonomy stuff to select the right tax, I don't even see a setting for taxonomy with the image_galley view. In fact, I don't even know there is a image_gallery view enabled? I have default views, but my views page says "No views have currently been defined"

any help?

I probably just need to download the lastest version and reset the views cache?

joachim’s picture

ricochet: sounds like you need to refresh the Views cache. There's a page to do this under Views -> Tools.

Carlos Miranda Levy’s picture

I got the same issue and I'm running MySQL v5.0.45-community

Hetta’s picture

marked http://drupal.org/node/209553 as duplicate.
marked http://drupal.org/node/207114 as duplicate.

gtcaz’s picture

I had something similar happen when updating to the last Drupal 6 development release. I had to re-import all my images and add them to taxonomy, then delete the missing image nodes. (At least that was the only way I could figure how to do it.) I didn't have the Views module installed. Same issue?

g10’s picture

This issue still seems to be present in 5.x-2.x-alpha3

a simple solution is to override the view and put the following in the argument handling code:

$args[0] = $args[1];
return $args;

adammichaelroach’s picture

What I did was go to 5.x-1.9, then put back in 5.x-2.x-alpha3. I still cannot override that view though. Also, even if I disable image gallery view, it is still available at ../image

asb’s picture

Hi,

> This issue still seems to be present in 5.x-2.x-alpha3

That I can confirm.

> a simple solution is to override the view and put the following in the argument handling code:
> $args[0] = $args[1];
> return $args;

That I can't confirm fully: It seems to work on some of my sites (main image gallery and sub-galleries are displayed), on others it doesn't (main image gallery shows up, sub-galleries don't).

There is at least one related issue, also with no solution yet.

Greetings, -asb

salvis’s picture

Priority: Normal » Critical

I tried upgrading from 5.x-1.9 to 5.x-2.x-dev, with the same result.

This issue is blocking the upgrade path to D6 — the front page says "If you're upgrading to 6.x you need to upgrade to the 5.x-2.x branch of the module in Drupal 5 before before [sic] moving to Drupal 6."

alanburke’s picture

Subscribing.
I've had the same issue as #6 when upgrading from 5.1.9 to 6.2.alpha 3.
Clearing views cache doesn't help.
[Edited to add that I'm using mysql 5]

The image nodes themselves are also broken [no images showing]...
Will keep digging around...

[Edited to say I meant 5.1.9 to 5.2.alpha3 ]

joachim’s picture

If the image nodes are broken and you're getting the SQL error message on upgrade, it sounds like it isn't the issue covered here originally, as that was only about Views.

This issue is a bit busy. As far as I can see:
#14 hasn't replied in a year.
#16 we don't know if clearing the cache worked.
#18: which same issue? There are too many floating around here :(
#20: if you don't have views installed, then probably not.
#21: Could you explain more? What is going on with the args? Was there a change in the path for galleries from 1.x to 2.x? Or are you using a path alias -- though I wouldn't have thought that would affect the args views finds?
#22: you're probably seeing the gallery provided built-in by gallery module -- hardcoded gallery rather than a view.
#25: broken image nodes is another problem. Is there a bug open for this?

So: can we say the original problem here is fixed, and that #207371: There are no images in this gallery. needs figuring out, and that other commenters' problems are also covered either in existing bugs and need filing?

sun’s picture

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Closed (fixed)

I agree.