Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Images dissapear after viewing the Files and Images tab

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2 3
Go to End
Author Topic: 3020 Views
  • Chip Designs
    Avatar
    Community Member
    15 Posts

    Images dissapear after viewing the Files and Images tab Link to this post

    Hi,

    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
    Source

    115    {
    116       $childData = parent::getChildDataObj();
    117       $childData->ImageGalleryPageID = $this->controllerID;
    118       return $childData;
    119    }
    120    
    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>

    Trace

    * 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 .cache.home.chipdesi.subdomains.montrosecfa-local.dataobject_manager.templates.DataObjectManager_popup.ss
    * include(/tmp/silverstripe-cache-home-chipdesi-subdomains-montrosecfa-local/.cache.home.chipdesi.subdomains.montrosecfa-local.dataobject_manager.templates.DataObjectManager_popup.ss)
    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.

    Cheers,
    Rob

  • jam13
    Avatar
    121 Posts

    Re: Images dissapear after viewing the Files and Images tab Link to this post

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

    Jamie

  • davidfsmith
    Avatar
    Community Member
    5 Posts

    Re: Images dissapear after viewing the Files and Images tab Link to this post

    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
    Avatar
    Community Member
    15 Posts

    Re: Images dissapear after viewing the Files and Images tab Link to this post

    File names used so far are:
    IMG1642.JPG
    Camera-116.jpg

  • davidfsmith
    Avatar
    Community Member
    5 Posts

    Re: Images dissapear after viewing the Files and Images tab Link to this post

    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

  • jam13
    Avatar
    121 Posts

    Re: Images dissapear after viewing the Files and Images tab Link to this post

    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?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Images dissapear after viewing the Files and Images tab Link to this post

    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
    Avatar
    Community Member
    15 Posts

    Re: Images dissapear after viewing the Files and Images tab Link to this post

    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?

    3020 Views
Page: 1 2 3
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.