Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Image_gallery and nestedUrls (Silverstripe 2.4)

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2
Go to End
Author Topic: 2031 Views
  • wmk
    Avatar
    Community Member
    45 Posts

    Image_gallery and nestedUrls (Silverstripe 2.4) Link to this post

    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

    The error:

    [Notice] Trying to get property of non-object
    GET /home/galerie/album/testalbum

    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 hints?

    cheers,

    wmk

  • theoldlr
    Avatar
    Community Member
    103 Posts

    Re: Image_gallery and nestedUrls (Silverstripe 2.4) Link to this post

    Any luck with solving this problem? I am facing the same issue.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image_gallery and nestedUrls (Silverstripe 2.4) Link to this post

    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.

  • theoldlr
    Avatar
    Community Member
    103 Posts

    Re: Image_gallery and nestedUrls (Silverstripe 2.4) Link to this post

    Worked like a charm. Thanks UncleCheese!

  • Chucky2k
    Avatar
    Community Member
    32 Posts

    Re: Image_gallery and nestedUrls (Silverstripe 2.4) Link to this post

    Hi Uncle Cheese,

    LinkingMode is not working when nestedUrls are enabled.

    Cheers

    David

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image_gallery and nestedUrls (Silverstripe 2.4) Link to this post

    Thanks.. you mean in ImageGalleryAlbum? That should be all set now.

  • Chucky2k
    Avatar
    Community Member
    32 Posts

    Re: Image_gallery and nestedUrls (Silverstripe 2.4) Link to this post

    Yeah, that was the one.

    Thanks again UC

  • monsieurk
    Avatar
    Community Member
    4 Posts

    Re: Image_gallery and nestedUrls (Silverstripe 2.4) Link to this post

    Hi,

    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.

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