これは実際には質問に答えないかもしれませんが、URLの書き換えが欠落している場合は、製品コレクションから製品を取り出す可能性があります。また、URL書き換え情報の追加は、で確認できるように自動ではありません\Magento\Catalog\Model\ResourceModel\Product\Collection::$_addUrlRewrite。
URLの書き換えを強制的に管理するcreate()方法は、のメソッドでプラグインを作成することです\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory。そして、コード(またはMagentoのコアコード)が製品コレクションをインスタンス化するためにこのファクトリを使用するとすぐに(ベストプラクティスとして)、このプラグインはを強制\Magento\Catalog\Model\ResourceModel\Product\Collection::$_addUrlRewriteしtrueます。
次に、製品のURL書き換えが製品に正常に追加され、それらをループして再ロードする必要はありません。したがって、@ Raphaelが述べたパフォーマンスの欠点を修正します。
プラグインXML定義は次のdi.xmlとおりです(ファイル内)。
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Model\ResourceModel\Product\CollectionFactory">
        <plugin name="your_plugin_unique_nane" type="Your\Plugin\Namespace\Plugin" />
    </type>
</config>
プラグインのコード:
namespace Your\Plugin\Namespace;
use Magento\Catalog\Model\ResourceModel\Product\Collection;
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as CoreCollectionFactory;
class Plugin
{
    /**
     * @param CoreCollectionFactory $subject
     * @param Collection $collection
     * @return Collection
     */
    public function afterCreate(CoreCollectionFactory $subject, Collection $collection)
    {
        $collection->addUrlRewrite();
        return $collection;
    }
}