Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with BlogCategory from blogger module #1

Open
mschilder opened this issue May 12, 2015 · 1 comment
Open

Problems with BlogCategory from blogger module #1

mschilder opened this issue May 12, 2015 · 1 comment

Comments

@mschilder
Copy link

Hi! I'm using blogger module https://github.com/micmania1/silverstripe-blogger and have set class BlogCategory to extends MultilingualDataObject.

This is in the original BlogCategory:

    public function getCMSFields() {
        $fields = new FieldList(
            TextField::create("Title", _t("BlogCategory.Title", "Title"))
        );
        $this->extend("updateCMSFields", $fields);
        return $fields;
    }

I think this piece of code somehow interferes with your multilingual module, als an error is thrown as soon as I'm trying to create/edit a BlogCategory in the CMS:

[User Error] FieldList::addFieldToTab() Tried to add a tab to object 'FieldList' - 'Root' didn't exist.

Can you have a look?

@northcreation-agency
Copy link
Collaborator

Hi.

You must inherit the fieldlist from parent. And also you must replace the
extend function call with the "doExtend".

Med vänliga hälsningar
Herbert Cuba Garcia
Kreationsbyrån
0704719151
Den 12 maj 2015 15:05 skrev "mschilder" [email protected]:

Hi! I'm using blogger module
https://github.com/micmania1/silverstripe-blogger and have set class
BlogCategory to extends MultilingualDataObject.

This is in the original BlogCategory:

public function getCMSFields() {
    $fields = new FieldList(
        TextField::create("Title", _t("BlogCategory.Title", "Title"))
    );
    $this->extend("updateCMSFields", $fields);
    return $fields;
}

I think this piece of code somehow interferes with your multilingual
module, als an error is thrown as soon as I'm trying to create/edit a
BlogCategory in the CMS:

[User Error] FieldList::addFieldToTab() Tried to add a tab to object
'FieldList' - 'Root' didn't exist.

Can you have a look?


Reply to this email directly or view it on GitHub
#1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant