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.
Hi Uncle Cheese,
i discoverd a bug in image-gallery module.
Albums work fine when the gallery is a root page (like in 2.3), e.g. domain.com/gallery/album/myalbum but doesn't when it's a subpage, e.g domain.com/stuff/gallery/album/myalbum
[Notice] Trying to get property of non-object
Line 194 in /path/to/public_html/image_gallery/code/ImageGalleryPage.php
Seems like$this->CurrentAlbum() is empty, cause gallery doesn't get the right param back using Director::urlParam('ID') in CurrentAlbum()...
Any luck with solving this problem? I am facing the same issue.
Finally had a chance to test this. It's actually a bug with SS 2.4.. They never updated Director::urlParams() to evaluate nested urls, so it returns the wrong values, as you saw.
Found a workaround by using Controller::curr()->urlParams. The changeset is checked in.
Worked like a charm. Thanks UncleCheese!
Hi Uncle Cheese,
LinkingMode is not working when nestedUrls are enabled.
Thanks.. you mean in ImageGalleryAlbum? That should be all set now.
Yeah, that was the one.
Thanks again UC
I was about to create a thread about this bug when I found this one.
I had faced the same problem than wmk (an ImageGalleryPage not working when it is level 2 or more, but works fine when root).
I have found a parade (using VirtualPage) but still want to have an well-formed structure for my ImageGallery.
Got the last trunk build.
Just test it a minute ago.
Works like a charm.
Thanks UncleCheese for this upgrade and your work.