Closed ScopeyNZ closed 5 years ago
You should probably run a dev/build as well as a flush in order to scaffold the elemental relationships for the page, but we can also probably build in some edge case handling for this as well
PR https://github.com/dnadesign/silverstripe-elemental/pull/537 Needs tests. Maybe. Unsure.
I was considering how to test this and I couldn't think of a good way. You'd need a behat test or something because you have to run a dev/build as a step within the test.
I have been considering it for some time now, and am not sure it's worth testing. I updated the comment on the PR itself with my thoughts.
Closed in #537
Affected Versions
4.x
Description
When adding the
ElementalPageExtension
to a page type after some pages have already been added the element editor on the CMS for the page will never load. This is because there is noElementalArea
in the database for that page.Steps to reproduce
ElementalPageExtension
.ElementalPageExtension
to that page type and flushNotes
In this case GraphQL is kicking up a fuss because a null/zero ElementalAreaId is not considered valid.
I've listed this as medium impact because it's usually recommended that a page type is created specifically for elemental and then this issue would not occur - it's hard to create a page type for elemental and have a period where it's not using the elemental extension.