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.

All other Modules

Discuss all other Modules here.

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

2.4.3 and latest Image_Gallery, can't import from existing folders


Reply

6 Posts   1068 Views

Avatar
Wilson

21 December 2010 at 6:29pm Community Member, 63 Posts

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

Avatar
Wilson

21 December 2010 at 6:30pm Community Member, 63 Posts

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

Avatar
DsX

22 December 2010 at 11:00am Community Member, 178 Posts

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.

Avatar
Nicolaas

1 June 2011 at 3:41am Forum Moderator, 213 Posts

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

Avatar
Wilson

1 June 2011 at 2:47pm Community Member, 63 Posts

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.

Avatar
Nicolaas

3 June 2011 at 3:52am Forum Moderator, 213 Posts

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