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.

Customising the CMS /

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

I get errors after I upload page.php


Go to End


1069 Views

Avatar
daniel123454

Community Member, 1 Post

10 August 2016 at 2:59am

Edited: 10/08/2016 3:05am

Hello,

i have trouble with uploading page.php. After I upload page.php I cannot connect to the website anymore. It says this:
The page (URL) does not respond. http error 500.
I also can not go to the admin page.

Does anyone have a fix for this?

Thanks regards

edit:
this is what i have added to the page.php

class Page_Controller extends ContentController {

/**
* An array of actions that can be accessed via a request. Each array element should be an action name, and the
* permissions or conditions required to allow the user to access it.
*
* <code>
* array (
* 'action', // anyone can access this action
* 'action' => true, // same as above
* 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
* 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
* );
* </code>
*
* @var array
*/
private static $allowed_actions = array (
'AanmeldForm'
);

public function AanmeldForm() {
// Create fields
$fields = new FieldList(
new TextField('Naam \n'),
new Textfield('Achternaam \n'),
new Textfield('E-mailadres \n')
new OptionsetField('Aanwezigheid', 'Ik ben aanwezig in de \n', array(
'Ochtend' => 'Ochtend',
'Middag' => 'Middag',
'Avond' => 'Avond'
))
new TextArea('Eventuele opmerkingen')
);

//Create actions
$actions = new Fieldlist(
new FormAction('doAanmeldForm', 'Verzenden')
);

return new Form($this, 'AanmeldForm', $fields, $actions);

}