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

ImageGalleryItems suddenly have wrong imageID's


Go to End


10 Posts   2638 Views

Avatar
vancouverWill

Community Member, 121 Posts

30 October 2009 at 1:35pm

I can see from the ImageGalleryItem table that all ImageGalleryItems are still there with the text I gave them for descriptions but they somehow have ImageIDs which are pointed to the wrong non-existent files now. Has anyone else had this problem. It is strange cause I go into the image gallery and there are twelve images like there used to be in the same order and the same description but they all point to non existent files. When I go to the File table I can see the files are still there but the file IDs must be the original ones as when you go back to the imagegalleryitem table the corresponding image has an imageID of a higher value that doesn't exist in the file table. I hope this makes sense to someone as to either a recognizable bug or some module or update which has caused the two tables to get out of alignment.

It doesn't really matter right now as I don't have that many images but it is obviously scary for the future as if a client uses the image gallery a fair amount and has a substantial number of images then loses the links all his or her work will be wasted. Looking forward to hearing other peoples experience with this matter.

cheers

Will

Avatar
UncleCheese

Forum Moderator, 4102 Posts

30 October 2009 at 2:48pm

When was the last time everything was working? Did this just happen suddenly or did happen after a specific change?

Avatar
vancouverWill

Community Member, 121 Posts

7 November 2009 at 10:07pm

hey sorry, I didn't notice you had replied as I wasn't subscribed. Yeah it happened suddenly. I still have no idea how they got out of alignment. In the end I deleted all the photos and reimported them. Just wondering if anyone else had this problem or had any thoughts. Thanks

Will

Avatar
vancouverWill

Community Member, 121 Posts

17 November 2009 at 12:10pm

So this happened again. I went to have a look at my site and there were no images in the gallery. I went to the admin section and the image gallery page showed that it remembered there were images before as there were as many grey faded out boxes as there used to be images. I understand this means the page knows there should be a photo but it doesn't know the link to it. I had a look in the file table and there were items with the classname 'ImageGalleryImage'. When I tried to add a new image to the gallery it worked fine and a new entry showed up in the image gallery and in the file table. However somehow all my previous images have somehow been wiped and no record is there of them in the file table at all. Should dev/build clear out the links? This seems like a major bug in image gallery yet I have no idea where it is coming from. Other than that super happy with the modules but this problem has got me stumped.

Thanks

Will

Avatar
UncleCheese

Forum Moderator, 4102 Posts

18 November 2009 at 3:39am

Yeah, that's not good. I'm really sorry you're having this issue. Is there any specific behavior you can point to that caused these images to break? When was the last time it was working? This is definitely a bug I'd like to nail down, assuming it is a bug, so the more info you can provide to help me replicate it, the easier that will be.

Avatar
Dave L

Community Member, 60 Posts

29 November 2009 at 9:24pm

I have this problem at the moment. Haven't been able to reproduce 100% but it seems to involve:

1. have images in Uploads folder
2. go to ImageGalleryPage's Photos tab in CMS
3. select Import from Existing folder

Something like...
4a. Choose a file
5a. "Close" the next popup (caption), instead of using the "Finish" button, OR

4b. Choose an image previously imported into another album
5b. "Close" the next popup (caption), instead of using the "Finish" button, OR

4c. Choose an image previously imported into another album,
5c. Select "Finish"

Not sure if step 4b or 5b is the problem, but I'm ending up with ImageGalleryItem IDs that aren't tied to File record IDs.

Will keep running some tests

Avatar
UncleCheese

Forum Moderator, 4102 Posts

30 November 2009 at 4:05am

Okay, good to know. Just make sure you're running tests on the most recent rev (r331).

Avatar
vancouverWill

Community Member, 121 Posts

1 December 2009 at 7:03am

Hmm, glad to see it is not just my setup but I guess shame to see other people are having a problem. Afraid I can't be as specific to exactly when the images were lost. Other staff were using the setup so when I came back to it and the image links were lost it was a surprise.

Go to Top