public function computePathAlias($nodeId, $siteId)
    {
        $nodeIdList = [];
        $menuId = $this->treeProvider->findTreeForNode($nodeId, ['site_id' => $siteId]);

        if ($menuId) {
            // Load the tree, with no access checks, else some parents might
            // be hidden from it and the resulting path would be a failure.
            $tree = $this->treeProvider->buildTree($menuId, false);
            $trail = $tree->getMostRevelantTrailForNode($nodeId);
            if ($trail) {
                foreach ($trail as $item) {
                    $nodeIdList[] = $item->getNodeId();
                }
            } else {
                // This should not happen, but it still can be possible
                $nodeIdList[] = $nodeId;
            }
        } else {
            $nodeIdList[] = $nodeId;
        }

        // And now, query all at once.
        $segments = $this
            ->database
            ->query(
                "SELECT nid, alias_segment FROM {ucms_seo_node} WHERE nid IN (:nodes)",
                [':nodes' => $nodeIdList]
            )
            ->fetchAllKeyed()
        ;

        // This rather unperforming, but it will only act on very small
        // arrays, so I guess that for now, this is enough.
        $pieces = [];
        foreach ($nodeIdList as $nodeId) {
            if (isset($segments[$nodeId])) {
                $pieces[] = $segments[$nodeId];
            }
        }

        // This is probably not supposed to happen, but it might
        if (!$pieces) {
            return null;
        }

        return implode('/', $pieces);
    }