-
Notifications
You must be signed in to change notification settings - Fork 2
[SRM-702] Fix for revision loading throws error on illegal offset type. #120
[SRM-702] Fix for revision loading throws error on illegal offset type. #120
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -234,8 +234,7 @@ protected function getCurrentNode() : ?NodeInterface { | |||
if ($route_name === 'entity.node.revision') { | |||
try { | |||
$vid = $this->routeMatch->getParameter('node_revision'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will directly return the node revision entity post Drupal 9.3.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@govindmaloo just saw your PRs, make sense, thanks for the change. I will put them in testing and merge them for the next release
Hey @govindmaloo I have updated the code, please have a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
We may replace the node logic by using context
further.
JIRA
https://digital-vic.atlassian.net/browse/SRM-702
Issue
Some of the $vid values returned as object and which causes illegal offset type error when calling the
loadRevision
function.Scenario - Go to a node in any CMS and click on the revision tab. Then click on any previous revision and then the CMS will throw error.
Changes
9.4 returns the vid directly from here -
$revision = $this->routeMatch->getParameter('node_revision');
#121