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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Images dissapear after viewing the Files and Images tab

Go to End

23 Posts   4782 Views

Chip Designs

Community Member, 15 Posts

12 July 2010 at 3:38pm

Edited: 12/07/2010 3:41pm


I'm using SS 2.3.7 and modules-image_gallery-r390.

The upload and display of images works perfectly, but when i view the "files and Images" tab in the admin section, and then go back to the gallery, the thumbnails icons of the images have turned into a blank file icons (in the photo tab) and when i view the published site the images are missing. When i click on the blank file icon in the gallery under the photo tab i get the following error:

[Notice] Trying to get property of non-object
GET /admin/EditForm/field/GalleryItems/item/15/edit?ctf[GalleryItems][start]=0&ctf[GalleryItems][per_page]=10&ctf[GalleryItems][showall]=0&ctf[GalleryItems][sort]=SortOrder&ctf[GalleryItems][sort_dir]=DESC&ctf[GalleryItems][search]=&ctf[GalleryItems][filter]=AlbumID_3&ctf[GalleryItems][view]=grid&ctf[GalleryItems][imagesize]=100

Line 124 in /home/chipdesi/subdomains/montrosecfa-local/image_gallery/code/ImageGalleryManager.php

115 {
116 $childData = parent::getChildDataObj();
117 $childData->ImageGalleryPageID = $this->controllerID;
118 return $childData;
119 }
121 public function getPreviewFieldFor($fileObject, $size = 150)
122 {
123 if($fileObject instanceof Image) {
124 $URL = $fileObject->SetHeight($size)->URL;
125 return new LiteralField("icon",
126 "<div class='current-image'>
127 <div id='preview-image'>
128 <img src='$URL' alt='' class='preview' />
129 <div class='ajax-loader'><img src='dataobject_manager/images/ajax-loader.gif' />". _t('ImageGalleryManager.ROTATING','Rotating')."...</div>
130 </div>


* ImageGalleryManager->getPreviewFieldFor(ImageGalleryImage,200)
Line 109 of ImageDataObjectManager.php
* ImageDataObjectManager_ItemRequest->DetailForm()
* call_user_func_array(Array,Array)
Line 318 of ViewableData.php
* ViewableData->obj(DetailForm,,1)
Line 36 of
* include(/tmp/silverstripe-cache-home-chipdesi-subdomains-montrosecfa-local/
Line 357 of SSViewer.php
* SSViewer->process(ImageDataObjectManager_ItemRequest)
Line 773 of ViewableData.php
* ViewableData->renderWith(DataObjectManager_popup)
Line 880 of DataObjectManager.php
* DataObjectManager_ItemRequest->edit(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 143 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 143 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 143 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 119 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 280 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/admin/EditForm/field/GalleryItems/item/15/edit)
Line 118 of main.php

Anyone else experienced this? I tried downloading the newest version of image gallery and using the imageGalleryManager.php which did not help, so put the old version back in.



121 Posts

12 July 2010 at 8:54pm

Can I ask what kind of filenames you are using? In particular upper/lower case letters, spaces and numbers at the end.



Community Member, 5 Posts

12 July 2010 at 10:18pm

Edited: 12/07/2010 10:22pm

Looks like I've just had a similar issue.

Added a file and then used "look for new files" and it added the additional file I had uploaded, however all image galleries on the site are now no longer working, just showing the missing image icon on the preview.

Using SS 2.4

Chip Designs

Community Member, 15 Posts

12 July 2010 at 11:55pm

File names used so far are:


Community Member, 5 Posts

13 July 2010 at 4:40am

Edited: 13/07/2010 4:41am

Ok it looks like the problem for me is happening when "Look for new Files" in Files and Assets is clicked.

Process being followed is

Images are bulk uploaded via FTP into the Assets dir, these images are then added to a gallery which works fine. However the next time the "Look for new Files" button is clicked it seems to remove data from the database that links the galleries to the images (assumption)

The correct number of images are showing in the gallery, but all as missing images. It could be that we need to do this an alternative way, but I'd be interested in knowing


121 Posts

14 July 2010 at 8:16am

We're seeing a similar problem sporadically on a 2.4 site. Images are not being uploaded with FTP, they are uploaded using the image field control. Everything seems to work ok until (we think) someone clicks the Look for new files button.

As yet I haven't had time to work out how to repeat the problem, but my initial guess was that is was something to do with either filename case sensitivity, spaces (replaced with hyphens) or trailing numbers (used to avoid filename collisions).

Chip Designs: Could you try repeating with filenames that are lower case only, don't have trailing numbers and don't contain spaces?


Forum Moderator, 4102 Posts

14 July 2010 at 8:30am

Keep me posted, guys. I can't replicate this one, but when you find a causal link, let me know and I'll start digging in.

Chip Designs

Community Member, 15 Posts

14 July 2010 at 7:17pm

Hi Jam13,

I tried uploading an image with the filename in lowercase with no spaces or numbers and it still has the same problem as before;(citysmall.jpg).

I tried this 2 different ways; 1st by uploading the image via the photo tab in the gallery module (upload from my computer). 2nd uploading the image from the 'files and Images' tab and then going to the gallery module and selecting the image (Import from exisitng folder) to no avail.

Could there be an issue with the "dataobject_manager" module that is needed for the image gallery module to work?

Go to Top