Jump to:

10854 Posts in 2518 Topics by 1794 members

All other Modules

SilverStripe Forums » All other Modules » 2.4.3 and latest Image_Gallery, can't import from existing folders

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 990 Views
  • Wilson
    Avatar
    Community Member
    63 Posts

    2.4.3 and latest Image_Gallery, can't import from existing folders Link to this post

    Hi UC,

    This may very well be an error in my installation, but I've installed image_gallery similar as in the past and when I try to import from existing FileStore images into an album, I get:

    [Notice] Trying to get property of non-object
    POST /admin/EditForm/field/GalleryItems/UploadifyForm?SecurityID=508831148&ctf[GalleryItems][start]=0&ctf[GalleryItems][per_page]=10&ctf[GalleryItems][showall]=0&ctf[GalleryItems][sort]=SortOrder&ctf[GalleryItems][sort_dir]=&ctf[GalleryItems][search]=&ctf[GalleryItems][filter]=AlbumID_1&ctf[GalleryItems][view]=grid&ctf[GalleryItems][imagesize]=100

    Line 140 in .../image_gallery/code/ImageGalleryManager.php
    Source

    137    public function getPreviewFieldFor($fileObject, $size = 150)
    138    {
    139       if($fileObject instanceof Image) {
    140          $URL = $fileObject->SetHeight($size)->URL;

    Do I need to set a relationship in Page.php or Photo.php to fix this? Like, say:

    public static $has_many = array (
       'Album' => 'Photos'
    );

    As always, thanks!
    Wilson

  • Wilson
    Avatar
    Community Member
    63 Posts

    Re: 2.4.3 and latest Image_Gallery, can't import from existing folders Link to this post

    I should add, that I can upload from my machine and also import into the gallery outside of albums.

  • DsX
    Avatar
    Community Member
    178 Posts

    Re: 2.4.3 and latest Image_Gallery, can't import from existing folders Link to this post

    I am also getting the same behavior.
    I will add that I am also having a hard time uploading to a specific asset folder. It seems to always put new images in the root of the asset folder.

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: 2.4.3 and latest Image_Gallery, can't import from existing folders Link to this post

    I am experiencing the same issue - Wilson, did you find a solution for this?

  • Wilson
    Avatar
    Community Member
    63 Posts

    Re: 2.4.3 and latest Image_Gallery, can't import from existing folders Link to this post

    Last time I checked, I was still getting it. In the meantime, I plan to train my clients to upload rather than 'Choose Existing', when they ask.

    UC explained in another similar thread, that's it quite a difficult issue due to a single image needing to be two classes. Someone else posted a 'many many' data model (I believe) that may be the answer. I'll try and find the thread. Or if you find it, let's put the link here.

  • Nicolaas
    Avatar
    Forum Moderator
    213 Posts

    Re: 2.4.3 and latest Image_Gallery, can't import from existing folders Link to this post

    I am extending the ImageGalleryPage and I think this is the problem...

    990 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.