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
A page with existing history loads correctly. When I change the Page type in the CMS page Settings, the history does not load, with the following error in the console:
Our team have just independently rediscovered this issue. Oddly, if the old class name is a class that no longer exists in the codebase, then history succeeds.
(This is with SS_ENVIRONMENT_TYPE="dev" for extra details)
In all cases I tested, both the original page class and the updated page class were namespaced subclasses of Page. I mention this because this issue seems similar to #363 , but it occurs in different circumstances, and the bug is still present when running version 4.11
In my case I was able to fix the history tab by removing all rows from the Page_Versions and SiteTree_Versions of the database which referenced versions of the page when it had a different class.
Using silverstripe/versioned 1.7.2
A page with existing history loads correctly. When I change the Page type in the CMS page Settings, the history does not load, with the following error in the console:
The problem seems to be in
Versioned::canViewStage()
which is called bySilverStripe\Versioned\GraphQL\Operations\ReadVersions
to get the history.When the current page type is different from an older version, line 1733 in
Versioned::canViewStage()
returns nullEven though the ID is there, the classname does not match, so the history cannot be viewed.
The text was updated successfully, but these errors were encountered: