Problem/Motivation
The {node}
parameter from node revisions routes are not upcasted. But a contrib module expects to receive full the entity in {node}
parameter. Example: \Drupal\ctools\Plugin\Condition\EntityBundle::evaluate()
.
Proposed resolution
Upcast the {node}
parameter for these paths:
/node/{node}/revisions/{node_revision}/view
/node/{node}/revisions/{node_revision}/revert
/node/{node}/revisions/{node_revision}/revert/{langcode}
/node/{node}/revisions/{node_revision}/delete
For a workaround, either use node_load()
and plan to remove it once the bug is fixed or see #18 for the more proper way to do it.
Remaining tasks
- Review the updated issue summary.
- Review the change record.
User interface changes
None.
API changes
\Drupal::routeMatch()->getParameter('node')
will return a Node object instead of an integer on the node-revision routes listed above.
Data model changes
None.