You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
History viewer will break as long as the versions list has more than 30 items.
How to reproduce
install this module into your project setup
create a new page
keep making edits until you have at least 31 versioned history items
navigate to the history tab
Expected behaviour:
I want to see the history list the same way as I see this list when I have 30 or less items.
Actual behaviour:
I don't see the history viewer at all.
Error observed:
Possible Solution
Likely caused by a regression on how pagination is handled during CMS 5 upgrade. Temporary workaround can be applied by limiting the number of items to 30.
<?phpnamespaceApp\Snapshots\Extensions;
useSilverStripe\Core\Extension;
useSilverStripe\ORM\DataList;
useSilverStripe\ORM\DataObject;
useSilverStripe\Snapshots\SnapshotPublishable;
/** * TODO remove this once module issue is resolved * https://github.com/silverstripe/silverstripe-versioned-snapshot-admin/issues/104 * * @method DataObject getOwner() */class PaginationWorkaroundExtension extends Extension
{
/** * Extension point in @see SnapshotPublishable::getRelevantSnapshots() * * @param DataList $result * @return void */publicfunctionupdateRelevantSnapshots(DataList &$result): void
{
$owner = $this->getOwner();
// Not relevant for this modelif (!$owner->hasExtension(SnapshotPublishable::class)) {
return;
}
// Limit the number of items in the history viewer to work around the pagination issue// https://github.com/silverstripe/silverstripe-versioned-snapshot-admin/issues/104$result = $result->limit(30);
}
}
Additional Context
No response
Validations
Check that there isn't already an issue that reports the same bug
Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
The text was updated successfully, but these errors were encountered:
Module version(s) affected
3.x-dev
Description
History viewer will break as long as the versions list has more than 30 items.
How to reproduce
Expected behaviour:
I want to see the history list the same way as I see this list when I have 30 or less items.
Actual behaviour:
I don't see the history viewer at all.
Error observed:
Possible Solution
Likely caused by a regression on how pagination is handled during CMS 5 upgrade. Temporary workaround can be applied by limiting the number of items to
30
.Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)The text was updated successfully, but these errors were encountered: