- Issue created by @pixelwhip
When editing a "Draft" node under content moderation, clicking "Done" redirects back to the canonical url for the node. I would expect it to redirect to the latest revision.
In the MercuryEditorEntityFormTrait::processRedirectUrl
there is the following check
if ($entity instanceof RevisionableInterface && ($entity->isDefaultRevision() || $entity->isLatestRevision())) {
$element['#value'] = $entity->toUrl('canonical', ['absolute' => TRUE])->toString();
}
else {
$element['#value'] = $entity->toUrl('latest-version', ['absolute' => TRUE])->toString();
}
It doesn't look like $entity->isDefaultRevision()
ever returns true, but $entity->isLatestRevision()
always returns true.
Active
3.0
Code