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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Tutorial 2: Staffholder StaffPage problems


Reply

5 Posts   833 Views

Avatar
daniel.cm

7 April 2009 at 7:52pm Community Member, 3 Posts

Hi I have been trying my hand at the tutorials and can't get beyond ss spiting the dummy when I try to rebuild the database.
I added StaffHolder.php and StaffPage.php to the code folder and then attempted to rebuild the database.

This is what I get from db/build?flush=1

Building Database

Creating database tables

PageComment
SiteTree
Field SiteTree.ClassName: changed to enum('SiteTree','Page','GhostPage','StaffHolder','StaffPage','ErrorPage','RedirectorPage','VirtualPage') character set utf8 collate utf8_general_ci default 'SiteTree' (from enum('SiteTree','Page','GhostPage','ErrorPage','RedirectorPage','VirtualPage') character set utf8 collate utf8_general_ci default 'SiteTree')
Field SiteTree_Live.ClassName: changed to enum('SiteTree','Page','GhostPage','StaffHolder','StaffPage','ErrorPage','RedirectorPage','VirtualPage') character set utf8 collate utf8_general_ci default 'SiteTree' (from enum('SiteTree','Page','GhostPage','ErrorPage','RedirectorPage','VirtualPage') character set utf8 collate utf8_general_ci default 'SiteTree')
Field SiteTree_versions.ClassName: changed to enum('SiteTree','Page','GhostPage','StaffHolder','StaffPage','ErrorPage','RedirectorPage','VirtualPage') character set utf8 collate utf8_general_ci default 'SiteTree' (from enum('SiteTree','Page','GhostPage','ErrorPage','RedirectorPage','VirtualPage') character set utf8 collate utf8_general_ci default 'SiteTree')
Email_BounceRecord
QueuedEmail
File
Group
LoginAttempt
Member
MemberPassword
Permission
Widget
WidgetArea
Page
GhostPage

Any help would be much appreciated.
Daniel

Avatar
banal

7 April 2009 at 8:19pm Community Member, 901 Posts

Umm. That output looks fine.. It's just the output generated by the DB build script and shouldn't be mistaken for the actual site-output :)
I don't really understand what the problem is. Did you create a StaffHolder and some StaffPages in the CMS? Maybe you should append ?flush=1 to the URL of these pages when you open them in the Browser. This will flush and re-render your templates.

Avatar
daniel.cm

7 April 2009 at 8:42pm Community Member, 3 Posts

All I did was but the StaffHolder.php and StaffPage.php into the code folder.
I tried it with the tutorial theme and the balance theme.
When I navigate to the root of the site ie http://localhost/silverstripe after doing the database rebuild I get a blank page.
I tried http://localhost/silverstripe/?flush=1 but still the same thing.
Maybe a reinstall is in order.

Avatar
banal

7 April 2009 at 8:48pm Community Member, 901 Posts

I guess there's an Error in your code somewhere. You should look into your PHP Error log.

Avatar
daniel.cm

7 April 2009 at 9:05pm Community Member, 3 Posts

Thanks - solved :) The problem was caused by unwanted special characters in the php file.
My editor TextWrangler was not showing all the characters in the php doc- don't know why.