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

Virtualising an ElementList causes the CMS ElementArea to fail to render #28

Open
jules0x opened this issue Aug 14, 2019 · 1 comment
Open

Comments

@jules0x
Copy link
Member

jules0x commented Aug 14, 2019

When trying to virtualise an ElementList, I've found that the CMS ElementArea for that page will no longer render once you save the virtual element.
The front-end does show the element successfully, but the elements on the page are no longer accessible in the CMS.

https://reactjs.org/docs/error-decoder.html/?invariant=31&args[]=object%20with%20keys%20%7B%7D&args[]=
Objects are not valid as a React child (found: object with keys {}).

SS 4.4.0
Elemental 4.1.1
Element Virtual 1.2.2

@jules0x
Copy link
Member Author

jules0x commented Aug 23, 2019

Looks to be the protected provideBlockSchema() function on ElementVirtual.php

Overriding the function on my custom virtual element as below resolves the issue

    protected function provideBlockSchema()
    {
        $blockSchema = parent::provideBlockSchema();
        unset($blockSchema['content']);
        return $blockSchema;
    }

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