Jump to:

10998 Posts in 2732 Topics by 1822 members

All other Modules

SilverStripe Forums » All other Modules » Image Gallery Extension: Testers Needed

Discuss all other Modules here.

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

Go to End
Author Topic: 77670 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Weird. I don't know why your SortOrder field would be null. I would just sort your albums once and that will update all of them with proper values.

  • WalterW
    Avatar
    Community Member
    18 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    The database field "SortOrder" is set for all pages (values from "0" to "4")!

    It seems, that the property {$this->CurrentAlbum()->SortOrder} (in the ImageGalleryPage.php) is not set under some (rare) circumstances.

    Maybe we could do a reasonable preset for this property?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    It should be setting the sort automatically on create. If you look at the last function in SortabledDataObject, you see..

       public function onBeforeWrite()
       {
          if(!$this->owner->ID) {
             if($peers = DataObject::get($this->owner->class))
                $this->owner->SortOrder = $peers->Count()+1;
          }
       }   

    Maybe something is wrong with that logic, but I've never seen this happen before.

    Maybe instead of !$this->owner->ID it should be if(!$this->owner->SortOrder) ?

  • WalterW
    Avatar
    Community Member
    18 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    To help you: This problem happens, when customers look to our images, they cannot insert or edit anything in the CMS!
    So the image related tables are quite static (maybe they have not been changed for some weeks)!

  • Pranil
    Avatar
    Community Member
    17 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Hey i get the same problem every now and then. Any ideas on how to fix it? Do we try the fix that UncleCheese suggested? Or is it something else?

  • denisrosset
    Avatar
    Community Member
    4 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Hi all,

    I tried to change the ImageGallery css in my custom theme, and was unable to do so using the stock ImageGallery install. If you want to do the same, you need to change a line in ImageGalleryPage.php; see attached patch.

    Cheers,

    Denis

    Attached Files
  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    Thanks! I've been meaning to update that for a while. Just checked it in.

  • churika
    Avatar
    Community Member
    29 Posts

    Re: Image Gallery Extension: Testers Needed Link to this post

    I'm unsure how to address the problem I have, and it's probably my own fault for not understanding how this all fully works but...

    I installed the dataobject_manager, swfupload and image_gallery correctly.

    But When I come to this page...(See buttonproblem.jpg attachment) the button is all messed up, but none the less the button works, just not sure why it's like that.

    Anyways my main problem is that I create an image gallery page using the image gallery template and then save & publish it, added the images fine, edit the albulm fine.

    Then I go to look at it http://127.0.0.1/gallery/ and nothing but a blank template is there...why is this?

    I created my own custom theme I don't know if this has anything to do with the problem.

    I tried inserting <% include GalleryPageContent %> but that gave me huge missing file errors or something.

    This is the error message...

    [Warning] file_get_contents() [function.file-get-contents]: Filename cannot be empty
    GET /gallery/album/Default-Album

    Line 280 in D:\Web\xampp\htdocs\sapphire\core\SSViewer.php

    Attached Files
    77670 Views
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.