Jump to:

10931 Posts in 2614 Topics by 1810 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: 76310 Views
  • rico
    Avatar
    Community Member
    5 Posts

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

    I haven't but just after i've written the thread, i realised that i need to install these Modules. And now it works very good.

    But still the download Link under http://www.silverstripe.org/imagegallery-module/ dosen't work, maybe you could check this.

    Thanks alot for your reply, and for the great module!

  • UncleCheese
    Avatar
    4085 Posts

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

    Thanks. I've contacted Silverstripe about the problem. Seems like something broke on their end.

  • Xeal
    Avatar
    Community Member
    37 Posts

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

    Hey,
    <br >wasn't sure where I should post this error and I didn't really want to make a new thread, since I can figured you must have your hands full with all the current threads due to the new release. I really have no idea how to create this problem, as for as I'm concerned this is an error that occurred after I updated to the latest SilverStripe release. I even tried wiping out the database and rebuilding it. I also get a strange warning when attaching an image as the cover image of an album. Not sure if other people are having the same problem, as I searched the forum and couldn't find anything. I would give the link to the website, but unfortunately it's still on my local machine and I don't have a server to put it on yet
    <br >
    <br >This is the warning I get when attaching a cover image
    <br >

    <br >Warning: Call-time pass-by-reference has been deprecated in C:\wamp\www\NewVersion\silverstripe-v2.3.2-rc1\dataobject_manager\code\flv\FLV.php on line 37
    <br >
    <br >Warning: Call-time pass-by-reference has been deprecated in C:\wamp\www\NewVersion\silverstripe-v2.3.2-rc1\dataobject_manager\code\flv\FLV.php on line 155
    <br >
    <br >Warning: Call-time pass-by-reference has been deprecated in C:\wamp\www\NewVersion\silverstripe-v2.3.2-rc1\dataobject_manager\code\flv\FLV.php on line 206
    <br >


    <br >
    <br >This is the fatal error that makes my gallery unable to load
    <br >

    <br >[User Error] singleton() Called without a class
    <br >GET /NewVersion/silverstripe-v2.3.2-rc1/new-imagegallerypage/?flush=all
    <br >
    <br >Line 272 in C:\wamp\www\NewVersion\silverstripe-v2.3.2-rc1\sapphire\core\Core.php
    <br >Source
    <br >
    <br >263 * data (e.g. the custom SilverStripe static handling).
    <br >264 *
    <br >265 * @uses Object::strong_create()
    <br >266 *
    <br >267 * @param string $className
    <br >268 * @return Object
    <br >269 */
    <br >270 function singleton($className) {
    <br >271    global $_SINGLETONS;
    <br >272    if(!isset($className)) user_error("singleton() Called without a class", E_USER_ERROR);
    <br >273    if(!is_string($className)) user_error("singleton() passed bad class_name: " . var_export($className,true), E_USER_ERROR);
    <br >274    if(!isset($_SINGLETONS[$className])) {
    <br >275     if(!class_exists($className)) user_error("Bad class to singleton() - $className", E_USER_ERROR);
    <br >276       $_SINGLETONS[$className] = Object::strong_create($className,null, true);
    <br >277       if(!$_SINGLETONS[$className]) user_error("singleton() Unknown class '$className'", E_USER_ERROR);
    <br >278    }
    <br >
    <br >Trace
    <br > * singleton() Called without a class
    <br > Line 272 of Core.php
    <br > * singleton()
    <br > Line 2380 of DataObject.php
    <br > * DataObject::get(,AlbumID = 1 AND ImageGalleryPageID = 5,,,0,30)
    <br > Line 382 of ImageGalleryPage.php
    <br > * ImageGalleryPage_Controller->Items()
    <br > Line 398 of ImageGalleryPage.php
    <br > * ImageGalleryPage_Controller->GalleryItems()
    <br > * call_user_func_array(Array,Array)
    <br > Line 318 of ViewableData.php
    <br > * ViewableData->obj(GalleryItems,,1)
    <br > Line 70 of .cacheC..wamp.www.NewVersion.silverstripe-v2.3.2-rc1.image_gallery.templates.Layout.ImageGalleryPage_album.ss
    <br > * include(C:\WINDOWS\Temp\silverstripe-cacheC--wamp-www-NewVersion-silverstripe-v2.3.2-rc1\.cacheC..wamp.www.NewVersion.silverstripe-v2.3.2-rc1.image_gallery.templates.Layout.ImageGalleryPage_album.ss)
    <br > Line 354 of SSViewer.php
    <br > * SSViewer->process(ImageGalleryPage_Controller)
    <br > Line 346 of SSViewer.php
    <br > * SSViewer->process(ImageGalleryPage_Controller)
    <br > Line 773 of ViewableData.php
    <br > * ViewableData->renderWith(Array)
    <br > Line 202 of ImageGalleryPage.php
    <br > * ImageGalleryPage_Controller->init()
    <br > Line 113 of Controller.php
    <br > * Controller->handleRequest(HTTPRequest)
    <br > Line 29 of ModelAsController.php
    <br > * ModelAsController->handleRequest(HTTPRequest)
    <br > Line 277 of Director.php
    <br > * Director::handleRequest(HTTPRequest,Session)
    <br > Line 121 of Director.php
    <br > * Director::direct(/new-imagegallerypage/)
    <br > Line 118 of main.php
    <br >
    <br >


    <br >
    <br >I attached a picture of the error because if you're anything like me I prefer seeing visuals than actual text.

    Attached Files
  • UncleCheese
    Avatar
    4085 Posts

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

    Interesting. I've updated the function that was using the pass by reference. I don't have a dev box to test on right now. Can you run an svn update and see if that fixes the bug?

  • Xeal
    Avatar
    Community Member
    37 Posts

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

    Well the warning was fixed to fix it all you have to do is go in php.ini and find "allow_call_time_pass_reference" and change the value to On. The warnings disappeared after that, but I still have the error crashing my website. I do have the latest version of all the modules.

    [EDIT]
    Yeah the update fixed the warnings.

  • Xeal
    Avatar
    Community Member
    37 Posts

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

    One of my friends helped me debug the error, and we came up with a solution, not sure if it's the best one though.

    $files = DataObject::get(
       singleton(str_replace("_Controller","",$this->class))->itemClass, //This line is the problem itemClass is a protected value
       "AlbumID = {$current_album->ID} AND ImageGalleryPageID = {$this->ID}",
       null,
       "",
    $limit
    );


    singleton(str_replace("_Controller","",$this->class))->itemClass,
    we replaced this line with
    singleton(str_replace("_Controller","",$this->class))->getItemClass(),

    and we also created a method in the ImageGalleryPage

    public function getItemClass()
    {
       return $this->itemClass;
    }


    And everything works now, as far as I can see.

    [EDIT]
    Patch file included as attachment

    Attached Files
  • AdamJ
    Avatar
    Community Member
    145 Posts

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

    Hey guys,

    Apologies if this has been covered earlier, I went back a fair way but didnt see anything like what I'm asking.

    Is there a way to get the last 5 uploaded images from all albums, and display square cropped images? This would be from both the albums page, and also a homepage pagetype.

    Cheers in advance

  • UncleCheese
    Avatar
    4085 Posts
    76310 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.