Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Gallery Module Error

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 2008 Views
  • Prabhjeet
    Avatar
    Community Member
    7 Posts

    Gallery Module Error Link to this post

    Well, I installed gallery. After getting done when i see gallery page, i get this error. Any Solution ??

    Notice: Undefined index: start in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 381

    Notice: Undefined variable: group in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Trying to get property of non-object in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Undefined variable: group in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Trying to get property of non-object in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Undefined variable: params in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 332

    Notice: Undefined variable: group in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Trying to get property of non-object in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Undefined variable: group in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Trying to get property of non-object in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Undefined variable: params in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 332

    Notice: Undefined variable: group in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Trying to get property of non-object in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Undefined variable: group in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Trying to get property of non-object in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Notice: Undefined variable: params in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 332

  • Willr
    Avatar
    Forum Moderator
    5483 Posts

    Re: Gallery Module Error Link to this post

    These are not errors as such - just warnings that the code not up to scratch. Open up that file and go to line 330 where the errors coming from and post it here, most likely its something like

    $Variable->Something();


    and that variable does exist.. Easy fix is to wrap a if($Variable) { // now do whatever } around where it is throwing that notice!

  • Prabhjeet
    Avatar
    Community Member
    7 Posts

    Re: Gallery Module Error Link to this post

    Nope. This solution doesn't work.

    Any else ?

  • Willr
    Avatar
    Forum Moderator
    5483 Posts

    Re: Gallery Module Error Link to this post

    What is the line 330 / line before tho?

  • Prabhjeet
    Avatar
    Community Member
    7 Posts

    Re: Gallery Module Error Link to this post

    these are 330, 331, 381 code lines:

    line 330: if( ! $item->PopupEmbed && $group->Type != 'Documents' && $group->Type != 'WebPages' )
                      
    line 331: $item->JSMedia = $this->Title . '[Media]';

    line 381: if( ! is_numeric( $_REQUEST['start'] ) )

  • Prabhjeet
    Avatar
    Community Member
    7 Posts

    Re: Gallery Module Error Link to this post

    And these line from 326 to 339:

    line 326: if( $imgThumbnail ) {
                   line 327: /** ...add the URL of the formatted image to our item... **/
                   line 328: $item->ThumbnailURL = Director::baseURL().$imgThumbnail->Filename;
                   line 329: $item->JSLightWindow = 'lightwindow';
                   line 330: if( ! $item->PopupEmbed && $group->Type != 'Documents' && $group->Type != 'WebPages' )
                   line 331: $item->JSMedia = $this->Title . '[Media]';
                   line 332: $item->PopupParams = $params;
                   line 333: /** ..create a link to view the 'Normal' version of the image **/
                   line 334: $item->FirstItemLine = $cpt % $this->MediaPerLine == 1;
                   line 335: $item->LastItemLine = $cpt % $this->MediaPerLine == 0;
                   line 336: $item->ShowTitle = $this->ShowTitle;
                   line 337: $item->ShowSize = $this->ShowSize;
                   line 338: $item->ShowImageDimensions = $this->ShowImageDimensions;
                line 339: }

  • Willr
    Avatar
    Forum Moderator
    5483 Posts

    Re: Gallery Module Error Link to this post

    Notice: Trying to get property of non-object in C:\wamp\www\ss\gallery\code\GalleryPage.php on line 330

    Does group exist?

    Try a Debug::show($group);

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