Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Manifest Builder Bug

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1658 Views
  • Anonymous user
    2 Posts

    Manifest Builder Bug Link to this post

    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:


    at top of function

    Suggests that manifest builder intermittently fails to pick up TextAreaField.php

  • Tim
    Core Development Team
    201 Posts
  • Ingo
    Forum Moderator
    801 Posts

    Re: Manifest Builder Bug Link to this post

    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 system

    for your specific problem: the class is actually called "TextareaField" with a lowercase "area"
    i've closed the bug as "invalid" - cheers for your bugreport!

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.