silverstripe / silverstripe-cms

Silverstripe CMS - this is a module for Silverstripe Framework rather than a standalone app. Use https://github.com/silverstripe/silverstripe-installer/ to set this up.
http://silverstripe.org/
BSD 3-Clause "New" or "Revised" License
515 stars 332 forks source link

[2012-06-23] Installation broken with Class 'Page' not found #485

Closed silverstripe-issues closed 10 years ago

silverstripe-issues commented 11 years ago

created by: crowdly created at: 2012-06-23 original ticket: http://open.silverstripe.org/ticket/7553


When calling domain.com/install.php the installation breaks after the first steps with the message:

Building database schema... Fatal error: Class 'Page' not found in /cms/code/model/SiteTree.php on line 1334

This was done with a correct git checkout of the current 3.0.0-rc1 tag of the cms, framework and installer

silverstripe-issues commented 11 years ago

comment by: @wilr (wrossiter) created at: 2012-06-23


The Page class is in the mysite folder (https://github.com/silverstripe/silverstripe-installer/blob/master/mysite/code/Page.php). If you manually git clone sapphire and cms you're most likely missing the mysite folder from your project. If you using the installer, check to make sure that path exists in your local copy.

silverstripe-issues commented 11 years ago

comment by: crowdly created at: 2012-06-23


The file does exist. I downloaded the files correctly, also those of the installer. Therefore I guess, there must be a coding error that it does not find this class?

silverstripe-issues commented 11 years ago

comment by: @sminnee (sminnee) created at: 2012-06-24


We should get to the bottom of this, but it doesn't block RC2, as it's likely to be something specific to crowdly's environment.

silverstripe-issues commented 11 years ago

comment by: crowdly created at: 2012-06-26


I found the reason. It seems that the current Silverstripe, including RC1 and RC2 of 3.0.0 is NOT possible to install with softlinks (ln -s in linux) to the folders where downloaded .git repositories of the framework and cms are placed. I tried this on 3 different machines. It is OK if one knows. Please make this clear in future versions of the installation documentation! It would have saved me a lot of time searching for the bug. Also, from a professional CMS, in principle I would expect that it is programmed such that it can easily work with softlink included "machine" folders. Typo3 for example can do that very very well. It would be an important feature in the future, in my opinion.

silverstripe-issues commented 11 years ago

comment by: @sminnee (sminnee) created at: 2012-06-27


You can do what you ask like so:

Create an index.php file in your project root:

<?php

define('BASE_PATH', dirname(__FILE__));
include('framework/main.php');

Edit the .htaccess, replacing framework/main.php with index.php

Hope this helps!

simonwelsh commented 10 years ago

Looks like a user-specific issue, so should be handled in forums/IRC.