I just upgraded my site from 4.6.5 to 5.1. I had Image and Image Galleries working on the old site with multiple galleries & images. I'd like to keep the same gallery structure / images for the upgrade. When I installed the new Image module with Image Galleries enabled, the old image galleries didn't seem to upgrade correctly. When clicking the Image Galleries menu link (mysite.com/images), it came up that I have no galleries. I looked in Categories, and there were 2 "Image Galleries" categories, both of Image type. The first vocabulary item had all the correct terms, and the 2nd vocabulary item was empty. I deleted the 2nd empty vocabulary item, which did not change the Image Galleries menu link. Then, I added a test image and was able to select my old galleries in the drop down menu. When I uploaded it, it showed up correctly in the correct gallery. However, it does not have a breadcrumb, although I am able to click on the taxonomy term for a taxonomy teaser view of the images. This did not cause the menu link to show the galleries.

Next, I tried to add an image gallery under admin/content/image/add. There, the only option available was Root and not my old galleries. I added a test gallery, and when I click on the Menu Link, that test gallery is the only one that show up. However, the new gallery is not selectable on the drop down menu when adding images and going to edit categories (admin/content/taxonomy) does not show any other Image Galleries than the old one.

It seems that adding an Image is associated with the original Taxonomy (original galleries), but the Image gallery portion is associated with the now deleted Taxonomy. Any advice on how to fix this?

CommentFileSizeAuthor
#12 image.install_135452.patch2.97 KBdrewish

Comments

drewish’s picture

do you have a backup that was made pre-upgrade? it seems like the image module didn't pickup your old gallery taxonomy. you might be able to fix it but it'd probably be eaiser to redo the upgrade and make sure it uses the correct taxonomy.

ryooki’s picture

I have a back up of the 4.6.5 database. Unless you mean pre Image Gallery install. I guess I could try to revert back to 4.6.5 and re-upgrade to 5.1, if you think that would be best.

ryooki’s picture

I just tried to revert back to 4.6.5 database & run the update.php again. I got a bunch of failures this time (probably b/c i hadn't simplified the modules before running the update). In anycase, it updated the image related databases, but I had the same problems. :( On the plus side, the random image block is working just fine. The original Image Galleries taxonomy ID is 2, and the new Image Galleries taxonomy ID is 8.

drewish’s picture

i think you need to be sure to run the upgrade script twice. once to upgrade drupal and again to upgrade the modules. i think there's an update that renames the variable pointing to the image_gallery's taxonomy. be sure to do this before loading the site, as it seem like the gallery isn't seeing the existing taxonomy and creating a new one.

ryooki’s picture

OK. I tried it again from scratch, and I still got essentially the same result. This time, I reverted to back to the 4.6.5 test site. I then upgraded to 5.1 using the recommended procedures (including disabling the image module). Once the system database section was upgraded. I uploaded the image module & img assist module to the site, enabled the image modules, and saved the configuration. When I did that, I got these error messages:
Table 'event' already exists query: CREATE TABLE event (nid int(10) unsigned NOT NULL default '0', event_start int(10) unsigned NOT NULL default '0', event_end int(10) unsigned NOT NULL default '0', timezone int(10) NOT NULL default '0', PRIMARY KEY (nid), KEY event_start (event_start) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in /home/mysite/public_html/test/includes/database.mysql.inc on line 172.
Table 'img_assist_map' already exists query: CREATE TABLE img_assist_map ( nid INT(10) UNSIGNED NOT NULL , iid INT(10) UNSIGNED NOT NULL , PRIMARY KEY (nid, iid) ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */; in /home/mysite/public_html/test/includes/database.mysql.inc on line 172.

Any ideas?

ryooki’s picture

Sorry, didn't complete my story. I then tried to use update.php to see what it would do. It said that there were no tables that needed to be updated, but I decided to go ahead & see if I could make it manually update the image & image gallery tables. That also didn't help. I don't know if I was supposed to do that, but in any case, it didn't seem to hurt.

Thanks again.

drewish’s picture

humm, those errors weren't image related so i won't offer any commentary. if you're still having the same problem, i think you'll need to manually edit the image gallery variable to reference the correct vocabulary. the devel module makes it easy to edit variables so you might want to install that.

ryooki’s picture

by devel module, I'm assuming your referencing http://drupal.org/project/devel? Which variables should I be changing? I see:
image_nav_vocabulary = i:2; which I believe is what I want.
image_gallery_nav_vocabulary i:8; which I believe is the incorrect one.

Does that sound about right?

drewish’s picture

yeah, i should have provide a link. edit the image_gallery_nav_vocabulary variable to be 2. and that should do the trick for you.

drewish’s picture

hey, actually hold off on that. let me try adding an update that will do it automagically. that way anyone else updating doesn't have to go to the same trouble. i'd appreciate if you could test if for me.

ryooki’s picture

Status: Active » Fixed

OK. I went ahead and did it, and I think it worked! It was a little nerve wracking for me, but I'm happy with the result. My Image Galleries links now work correctly. Just in case anyone else has this issue, this is what I had to do:
1) Install the Devel module.
2) Turn on the Execute php block. (using the devel block's Variable Editor didn't work).
3) Type & Execute: "variable_set(image_gallery_nav_vocabulary,2);"

Thanks for your help!

drewish’s picture

StatusFileSize
new2.97 KB

give this a try

ryooki’s picture

oops! I didn't see your comments before I did it. lol. I'll make a new test site & try it out.

ryooki’s picture

Unfortunately, I still got the same result. :( I still have 2 Image gallery categories with the new, extra one set as 8.

Anonymous’s picture

Status: Fixed » Closed (fixed)
drewish’s picture

Status: Closed (fixed) » Needs work

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

HarryCambs’s picture

Here is a note for anyone planning upgrading, developers and anyone experiencing something similar.

I also went through the exact same pains to upgrade from 4.6.5 to 5.1.
The solution #11 worked and in my case had to consult taxonomy because the image_gallery_nav_vocabulary variable needed to be 1.

The image module then recognized the existing galleries but with one very annoying point caused by GD:
"Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 9952 bytes) in ~/public_html/includes/image.inc on line 308"

As I am on shared hosting I cannot increase the PHP memory limit. To get around the GD problem I installed Imagemagick according to http://drupal.org/node/131994 but it failed to recognize the Imagemagick path ( http://drupal.org/node/140401 ).

Also there is another side effect with the Imagemagick install: http://drupal.org/node/137755

I am trying to make Imagemagick work now.

So there you have it, hope this helps.

nonsie’s picture

Category: support » bug

I upgraded my site from 4.6.5 to 5.1 as well. I had the same issues with dissapearing images until I tried solution # 11.
However I still get "Unable to create thumbnail image" error messages ( I am using GD). The files for thumbnails exist on the server. Using content ->update image thumbnails doesn't help either. Any ideas?

drewish’s picture

nonsie, check your files path. i'd imagine it's changed since 4.6.

nonsie’s picture

I have the file path set up the same way it was in 4.6.
All thumbnails, previews and originals are in the specified folder. I get the "Unable to create scaled thumbnail image" error message while some thumbnails are loaded and some are not.
For example on http://www.nonsie.net/image/tid/2 there's 4 error messages and 6 thumbnails...

sun’s picture

Status: Needs work » Closed (won't fix)

Soory, this issue is way too old to have a chance to get fixed. Feel free to re-open this issue if you want to supply a working patch.