Hi UncleCheese
I am now thoroughly confused. I have upload new site with ss 2.4 and have DOM and Image gallery. I have an image gallery page top level and all albums work fine. As soon as I go down a level and setup a image gallery page it throws up an error when I click on an album. Works Top level works, not sub level. Wacky any ideas.
Steve
"Trying to get property of non-object"
GET /what-we-do-2/test-gallery/album/test1
Line 194 in /www/sw1b/image_gallery/code/ImageGalleryPage.php
Source
185 if($url_segment = Director::urlParam('ID')) {
186 $albums = DataObject::get($this->albumClass,"ImageGalleryPageID = {$this->ID} AND File.Name = '$url_segment'", "", "LEFT JOIN File ON File.ID = FolderID");
187 return $albums ? $albums->First() : false;
188 }
189 return false;
190 }
191
192 public function AlbumTitle()
193 {
194 return $this->CurrentAlbum()->AlbumName;
195 }
196