Closed elliot-sawyer closed 1 month ago
I can't reproduce this - following those instructions, the page shows up fine in archive admin, and its page type is displayed as "Page" - i.e. it falls back to Page
, not to DataObject
.
The records in question used to be Mailchimp newsletter pages, but the module was removed at some point. Perhaps it was unpublished after the module was removed.
Not hugely urgent since the posted workaround works for us, I thought I'd post it here to share with anyone else who hits the issue :+1:
Tried archiving after deleting the custom page class and dev/build but got the same result.
If someone can find a way to reproduce this that'd be great - if not, it will likely be closed at some stage in the future.
Closing as there are no new reproduction steps. If someone can reproduce, feel free to @
me with more details and I'll look at it again.
Module version(s) affected
2.2.0
Description
If any obsolete class records are present in the Archives Admin, it fails with the following error:
Uncaught BadMethodCallException: Object->__call(): the method 'getLastEdited' does not exist on 'SilverStripe\ORM\DataObject'
This is because non-existent classes default to DataObject, which does not have an actual
LastEdited
database column. Commenting out this line sort of* resolves the issue: it allows the Gridfield to load, but any pages with a broken/obsolete record will throw a 500 errorHow to reproduce
Not 100% sure how to reproduce, but:
Possible Solution
Adding this method to DataObject.php via an Extension makes the issue go away:
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)