17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1552 Views |
-
Manifest Builder Bug

24 December 2007 at 9:59am
Modified mysite/code/Page.php with following code:
function getCMSFields() {
$rhs_sidebar_content = new TextAreaField('rhs_sidebar_content', 'RHS Sidebar Content');
$rhs_sidebar_flag = new CheckboxField('rhs_sidebar_flag', 'Show RHS Sidebar');
$lhs_sidebar_content = new TextAreaField('lhs_sidebar_content', 'LHS Sidebar Content');
$lhs_sidebar_flag = new CheckboxField('lhs_sidebar_flag', 'Show LHS Sidebar');$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', $rhs_sidebar_content, 'Content');
$fields->addFieldToTab('Root.Content.Main', $rhs_sidebar_flag, 'Content');
$fields->addFieldToTab('Root.Content.Main', $lhs_sidebar_content, 'Content');
$fields->addFieldToTab('Root.Content.Main', $lhs_sidebar_flag, 'Content');
return $fields;
}Get error in admin of:- Fatal error: Class 'TextAreaField' not found in C:\wamp\www\ss\mysite\code\Page.php on line 15
Fault is intermittent but occurs mainly when clicking from "Site Content" to any page on the LHS menu
Fault can be worked around by adding line:
include_once('forms/TextAreaField.php');
at top of function
Suggests that manifest builder intermittently fails to pick up TextAreaField.php
-
Re: Manifest Builder Bug

24 December 2007 at 10:38am
Logged this @
http://open.silverstripe.com/ticket/2057#preview -
Re: Manifest Builder Bug

24 December 2007 at 2:02pm
some info:
- a silverstripe PHP-class should always be contained in a file with the same name (e.g. "class TextareaField" should be contained in TextareaField.php) - this is how the manifestbuilder magically detects the required includes
- PHP-classnames are case-sensitive
- filenames might be case-sensitive depending on the operating systemfor your specific problem: the class is actually called "TextareaField" with a lowercase "area"
i've closed the bug as "invalid" - cheers for your bugreport!
| 1552 Views | ||
|
Page:
1
|
Go to Top |



