Node paths come through empty unless view result is programmatically changed Task: to retrieve a list of nodes in JSON format including their aliases generated by Pathauto module. The configuration of my view is this:



Problem: path fields come empty - they won't include original Drupal path to it nor an alias generated by Pathauto:



The current solution I've got is to programmatically amend view's result in the following way:

function my_custom_views_pre_render(\Drupal\views\ViewExecutable $view) {
foreach($view-&gt;result as $value) {
    $url = \Drupal\Core\Url::fromRoute('entity.node.canonical', ['node' =&gt; $value-&gt;_entity-&gt;get('nid')-&gt;value], ['absolute' =&gt; false]);
    $url = $url-&gt;toString();
    $value-&gt;_entity-&gt;set('path', $url);
}


}

And that populates the path fields:



I'd like to know if there is a way to avoid the hook and make views return node paths without it, or is it normal Drupal Views behaviour?

P.s.: If I chose "Fields" instead of "Entity" in the Format section in the Views UI, it does return me the correct paths. However I want to get the full entity due to extensive data it consists for later consumption.
Thanks!
Put Show on field, then remove "title" field and add Path field



and if you want result be Absolute Url  on Rewrite secion Check Use absolute link (begins with "http://")