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

Just installed... already a problem


Go to End


11 Posts   35788 Views

Avatar
Humjaba

Community Member, 1 Post

15 January 2008 at 7:05pm

Edited: 15/01/2008 8:24pm

Hey all,

So with a fresh install of Silverstripe on WinXP SP2 with Apache 2.2.4, PHP 5.2.3 and mySQL 5.0+ I get an error call to undefined index with AssetTableField.php on line 25 (or something to that affect) in the Files & Images section. I do the /db/build and no more problem. Not a big deal, but kind of worrying getting an error message on a clean install.

Now, I try to install the gallery. I put gallery in the root folder, do a db build and flush, and create a new gallery page. I then go to Files and Images and upload some stuff into the gallery folder just created. I go to view it on my site, and they show up just fine, but there's a half page of errors above it that look like this:

Notice: Undefined index: start in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 381

Notice: Undefined variable: group in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 330

Notice: Trying to get property of non-object in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 330

Notice: Undefined variable: group in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 330

Notice: Trying to get property of non-object in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 330

Notice: Undefined variable: params in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 332

Notice: Undefined variable: group in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 330

Notice: Trying to get property of non-object in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 330

Notice: Undefined variable: group in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 330

Notice: Trying to get property of non-object in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 330

Notice: Undefined variable: params in E:\Apache\htdocs\silverstripe\gallery\code\GalleryPage.php on line 332

Any help? I like silverstripe more than the other CMS programs I've used but have been at it for an hour and can't get it working...

And (last thing) when I press sort sub-pages under content I get this

Error in Ajax evaluator on line 974: invalid flag after regular expression
Notice: Undefined index: ID in E:\Apache\htdocs\silverstripe\cms\code\LeftAndMain.php on line 671
Error in request

Thanks
-Tyler

Avatar
arozz7

Community Member, 2 Posts

2 February 2008 at 4:41pm

I also just installed the Gallery and I am experiencing the same problem when I place the pictures in the Upload directory and point the Gallery Page there. However, if I point the Gallery Page to another directory under Assets (e.g. Gallery) the page does not load any images. In Firefox console I do not see errors though in IE 7 I get a warning on line 846, char 3, Object doesn't support this property or method. I suspect this line number pertains to the lightwindow.js file. This also occurs if there are no images in the directory. Please let me know if I am doing something wrong. I have XP SP2 with Apache 2.2.4, PHP 5.2.5 and MySql 5.0.27. Thanks in advance. The rest of the CMS is working fine.

I fixed an undefined index error in the GalleryPage.php

Original Code: Lines 377 - 386
function CurrentGalleryItems() {
/** Get the limit **/
$limit = "";
if( $this->MediaPerPageLimit ) {
if( ! is_numeric( $_REQUEST['start'] ) )
$_REQUEST['start'] = 0;
$limit = $_REQUEST['start'] . "," . $this->MediaPerPage;
}
return $this->GalleryItems( $limit );
}
-----------------------------------------------------
Fixed Code: Lines 377 - 393
function CurrentGalleryItems() {
/** Get the limit **/
$limit = "";
if( $this->MediaPerPageLimit ) {
if (!EMPTY($_REQUEST['start'] ) ){

if( ! is_numeric( $_REQUEST['start'] ) )
$_REQUEST['start'] = 0;
}
else
{
$_REQUEST['start'] = 0;
}
$limit = $_REQUEST['start'] . "," . $this->MediaPerPage;
}
return $this->GalleryItems( $limit );
}

Avatar
arozz7

Community Member, 2 Posts

8 February 2008 at 4:02pm

I guess nobody else has experienced this problem? Is this posted in the wrong place. I can not seem to resolve this issue.

Avatar
Design City

38 Posts

8 February 2008 at 7:36pm

Try to jump on icq, you may have better luck there. Sorry, I have no experience with the Windows installer/lighty so I don't think I'll be able to help :(

Avatar
vokesalex

Community Member, 1 Post

7 March 2008 at 9:20am

I had the same problems and managed to remove the errors by editing the galleryPage.php file.

To remove the error on line 381 I followed arozz7's fix.

The other 2 errors looked like they were variables being referenced out of scope.

To fix error on line 330 I added

$group = $this->Extensions();

to the top of the function under
function GalleryItems( $limit ) {

To Fix error on line 332 I moved the line

$params = array();

from line 285 to the line underneath the line you added in the last step.

I've attached my galleryPage.php as an attachment for ease of use.

I'm not a php programmer, but I have working galleries using images in the galleries folder and no errors.

Hope this helps :D

Avatar
saimo

Community Member, 67 Posts

9 March 2008 at 12:13am

I'm having the same problem...
The fixes above removes the errors but leaves me with a blank page.

Avatar
saimo

Community Member, 67 Posts

10 March 2008 at 2:13am

vokesalex,

I've got a fix which believe to be a bit cleaner. Apart from changing CurrentGalleryItems() as described earlier, I have moved the initialisation of $params and $group to the beginning of the first foreach statement, giving the the attached result.

Avatar
Daminipo

Community Member, 14 Posts

24 July 2008 at 3:05am

Well...
Saimo, if i use your fixed version i get an Error and nothing works...

I won't get that Error on line 330 where:

if( ! $item->PopupEmbed && $group->Type != 'Documents' && $group->Type != 'WebPages' )

is made... because $group is not an object.
I just wonder why all the other calls on $group are working...

I've got no idea how to get that thing running.

and there's another thing. somewhere around line 380++ you'll find something like:

if( ! is_numeric( $_REQUEST['start'] ) )

and that doesn't work either. I get complains that the index "start" doesn't exists...

Don't know how to fix that one as well...

anyone got a helping hand?

Go to Top