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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Gallery Module Error


Go to End


7 Posts   2650 Views

Avatar
Prabhjeet

Community Member, 7 Posts

18 June 2008 at 9:02pm

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

Avatar
Willr

Forum Moderator, 5523 Posts

18 June 2008 at 10:05pm

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!

Avatar
Prabhjeet

Community Member, 7 Posts

19 June 2008 at 6:36pm

Edited: 19/06/2008 7:55pm

Nope. This solution doesn't work.

Any else ?

Avatar
Willr

Forum Moderator, 5523 Posts

19 June 2008 at 6:41pm

What is the line 330 / line before tho?

Avatar
Prabhjeet

Community Member, 7 Posts

19 June 2008 at 7:55pm

Edited: 19/06/2008 7:58pm

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'] ) )

Avatar
Prabhjeet

Community Member, 7 Posts

19 June 2008 at 8:02pm

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: }

Avatar
Willr

Forum Moderator, 5523 Posts

20 June 2008 at 5:45pm

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);