Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

ImageGallery issues after upgrade from 2.3.7 to 2.4


Go to End


8 Posts   1995 Views

Avatar
sorich87

Community Member, 14 Posts

13 October 2010 at 5:26pm

Edited: 13/10/2010 5:30pm

Hello!

A picture is worth a thousand words, isn't it? (this is an excuse. in fact I am tired having spent all the night and yesterday trying to solve this issue).

http://img833.imageshack.us/img833/2358/selection009a.png

http://img291.imageshack.us/img291/3266/selection010.png

http://img151.imageshack.us/img151/4413/selection012.png

(Pasting the issue description from irc, since I can't write it again)

I am having issues with the Files & Images and Image Gallery module
I recently upgraded from 2.3.7 to 2.4
and getting error messages in Files & Images
so I emptied the File table in the database
and was able to browse the folder in Files & Images
then, still having errors on the image gallery page (same message as here http://www.silverstripe.org/all-other-modules/show/291973?start=8#post292377), I changed the folder and files permissions via ftp
(for some reason, they were all 705)
now, I don't get any error message
but I still can't see the images on the image gallery page

Additional details:
- I recursively changed the folders and files permissions to 777. Then, I reloaded the page (after cleaning my browser cache). And the _resampled files permissions are back to 705 again.
- For some reason, some images are stored directly in assets, not in the image-gallery folder (not sure if this is an issue).
- According to the screenshots above, the images are loaded by the browser.
- I use the latest stable version of DOM (2.4 compatible) and latest svn of ImageGallery and Uploadify

(now heading to bed, hoping someone will post the solution before I come back :D )

Any help will be much appreciated. Thanks!

Avatar
UncleCheese

Forum Moderator, 4102 Posts

13 October 2010 at 5:51pm

It's not a permissions issue.. It's a data integrity issue. The files that were once related to those ImageGallery items are orphaned for some reason.

Look in the database and make sure all the ImageGalleryItem records have an ImageID that corresponds to an entry in the File table. Make sure that entry in the File table has the "ImageGalleryImage" ClassName.

---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com

Avatar
sorich87

Community Member, 14 Posts

13 October 2010 at 8:48pm

Edited: 13/10/2010 9:42pm

Ok. I did it with the following sql query

UPDATE FILE SET ClassName =  'ImageGalleryImage' WHERE ID IN ( SELECT ImageID FROM ImageGalleryItem );
. Posting it here in case someone else have the same problem.

Thanks UncleCheese! You are definitely a lifesaver!

Avatar
UncleCheese

Forum Moderator, 4102 Posts

14 October 2010 at 2:37am

Wow. That was a good guess. Go me.

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
sorich87

Community Member, 14 Posts

14 October 2010 at 5:11am

I definitely agree: Go You! :D

Finally, I have to fix the galleries manually, because the new images IDs are different from the old ones, and everything is "sens dessus dessous". And they have got at least one thousand images and several galleries and albums. :(

Avatar
UncleCheese

Forum Moderator, 4102 Posts

14 October 2010 at 6:28am

Je ne saviais pas que tu étais francophone ! Je t'aurais répondu tout en français !

A plus..

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
sorich87

Community Member, 14 Posts

14 October 2010 at 6:32am

Tu n'as pas reconnu mon pseudo. ;) Ulrich -> xetic.

++

Avatar
sorich87

Community Member, 14 Posts

17 October 2010 at 11:35am

Hey UncleCheese!

Still having issues here. When I upload new images, I am getting blank thumbnails. The images are correctly uploaded, but it seems like they are not associated to gallery items.
This is the error I get when trying to delete the gallery items: "Uncaught Exception: DataObject::delete() called on a DataObject without an ID" at line 1126 of /...../sapphire/core/model/DataObject.php.
Can you help with this?

Thank for all!