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.

All other Modules /

Discuss all other Modules here.

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

server error after failed subsites module upload


Go to End


3 Posts   1737 Views

Avatar
honeybunny

Community Member, 79 Posts

3 February 2010 at 1:01pm

Edited: 03/02/2010 2:19pm

My subsites module upload failed and now I am getting server errors.

I started yesterday with the current stable version of subsites, subsites-vo.1. I unzipped the file and ftpd it to the server, then did /dev/build/?flush=1, but nothing happened. The flush page came up without errors but didn't show any new tables. I then went to the admin interface where I received a server error. It wouldn't let me log back in and I couldn't figure out how to fix it, so I went back to the server and deleted the subsites module and did another flush.

After deleting the module and flushing I was able to log in to the admin interface without issue so I figured everything was fine. So today I decided that since I recently upgraded SS to 2.3.5 it might be worth trying the trunk version of subsites, so I unzipped the trunk file on the desktop and ftpd it up to the server. Just like yesterday I did /dev/build/?flush=1 and the flush page scrolled in front of me without showing any new tables. Also like yesterday I was unable to log back into the admin interface after uploading the module. (I was logged in when I originally uploaded the files, but got bumped out with the server error.) I thought that I could just delete the new module as I did yesterday, and get back to square one, but I was wrong.

Unlike yesterday, the only thing that happened when I deleted the module and flushed was that I was able to log in to the admin interface. Today I am finding that I can no longer bring up the live site. I added ?isDev=1 to the url to see if I could find where the problem was, but I can't make much sense of the error message.

I'm assuming that something was re-written when I did the upload but have no idea where to begin to start looking. Can somebody point me in the right direction? I am including a txt file of the complete error message with the hope that someone will understand it and let me know what the problem is and how to fix it.

I really don't know where I went wrong. I followed the steps at http://doc.silverstripe.org/doku.php?id=modules:subsites and I've installed other modules without issue so I know I'm putting them in the right place, yet both attempts at loading the subsites module failed in a manner that left the website unusable.

As always any help is appreciated.

Thanks!

HB

=========================================
ETA: I forgot to mention that I did try some of the suggestions for 500 server errors that I found in other posts. I changed .htaccess, deleted one of the .htaccess files, and tried restoring the .htaccess to its original state but none of these fixed the problem. At this point I am considering re-installing SS and starting over.

Attached Files
Avatar
Hamish

Community Member, 712 Posts

3 February 2010 at 3:36pm

Well the error as supplied indicates a problem in HomePage.php - if you look at the error trace the source of the sql error is on line 30 of HomePage.php. Looks like you're not supplying the parent ID correctly.

Don't know if it will solve you subsites problem, but you need to fix that first.

Avatar
honeybunny

Community Member, 79 Posts

4 February 2010 at 3:20am

Thank You Hamish!
I saw that line on the error message but thought that it was the result of the original error, not the cause. (IE: It wasn't working because something else was wrong.) Of course I also thought that line 30 was correct because it was displaying the summary.

I changed it to this:

function FashionNews($number=3) {
$news = DataObject::get_one('ArticleHolder', "Title = 'Fashion'");
return DataObject::get('ArticlePage', "ParentID = {$news->ID}","Created DESC", false, $number);
}

which got rid of the server error, but it is still injecting line breaks into the summary and now a lot of my styling has gone wonky. Not a problem though, now that I can see the page I can fix the styles. (Assuming that this was what was causing all my problems.)

Thanks again!

HB