Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » ImageGallery issues after upgrade from 2.3.7 to 2.4

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1092 Views
  • sorich87
    Avatar
    Community Member
    14 Posts

    ImageGallery issues after upgrade from 2.3.7 to 2.4 Link to this post

    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 )

    Any help will be much appreciated. Thanks!

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageGallery issues after upgrade from 2.3.7 to 2.4 Link to this post

    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

  • sorich87
    Avatar
    Community Member
    14 Posts

    Re: ImageGallery issues after upgrade from 2.3.7 to 2.4 Link to this post

    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!

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageGallery issues after upgrade from 2.3.7 to 2.4 Link to this post

    Wow. That was a good guess. Go me.

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

  • sorich87
    Avatar
    Community Member
    14 Posts

    Re: ImageGallery issues after upgrade from 2.3.7 to 2.4 Link to this post

    I definitely agree: Go You!

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageGallery issues after upgrade from 2.3.7 to 2.4 Link to this post

    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

  • sorich87
    Avatar
    Community Member
    14 Posts

    Re: ImageGallery issues after upgrade from 2.3.7 to 2.4 Link to this post

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

    ++

  • sorich87
    Avatar
    Community Member
    14 Posts

    Re: ImageGallery issues after upgrade from 2.3.7 to 2.4 Link to this post

    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!

    1092 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.