Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292566

Node revision routes don't convert {node} param

$
0
0

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

  1. Review the updated issue summary.
  2. 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.


Viewing all articles
Browse latest Browse all 292566

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>