Skip to main content
Post Closed as "Duplicate" by avpaderno
removed tags from the title
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Node::load() with specific revision id in D8ID

I want to load the node details with a specific revision load the node details for a specific revision. I tried it as follows :using the following code.

use Drupal\node\Entity\Node;
$nid = 1171;$vid1171;
$vid = 9423;
$rev_node = Node::load($nid, $vid, TRUE);

I also tried likethe following code.

$rev_node = node_load($nid, $vid);

It always loadloads the latest version latest version, irrespective of the revision id given . Any solution revision ID passed to the method/ workaroundfunction call.

Is there a way to load the data for this a specific revision?

Node::load with specific revision id in D8

I want to load the node details with a specific revision . I tried it as follows :

use Drupal\node\Entity\Node;
$nid = 1171;$vid = 9423;
$rev_node = Node::load($nid, $vid, TRUE);

I also tried like

$rev_node = node_load($nid,$vid);

It always load the latest version , irrespective of the revision id given . Any solution / workaround for this ?

Node::load() with specific revision ID

I want to load the node details for a specific revision. I tried using the following code.

use Drupal\node\Entity\Node;
$nid = 1171;
$vid = 9423;
$rev_node = Node::load($nid, $vid, TRUE);

I also tried the following code.

$rev_node = node_load($nid, $vid);

It always loads the latest version, irrespective of the revision ID passed to the method/function call.

Is there a way to load the data for a specific revision?

Source Link
KTM
  • 2.4k
  • 4
  • 47
  • 70

Node::load with specific revision id in D8

I want to load the node details with a specific revision . I tried it as follows :

use Drupal\node\Entity\Node;
$nid = 1171;$vid = 9423;
$rev_node = Node::load($nid, $vid, TRUE);

I also tried like

$rev_node = node_load($nid,$vid);

It always load the latest version , irrespective of the revision id given . Any solution / workaround for this ?