We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d80ef8f commit b8f6a3aCopy full SHA for b8f6a3a
app/code/Magento/UrlRewrite/Model/Storage/DbStorage.php
@@ -266,6 +266,8 @@ private function prepareUniqueEntities(array $urls): array
266
*/
267
protected function doReplace(array $urls)
268
{
269
+ $this->connection->beginTransaction();
270
+
271
$this->deleteOldUrls($urls);
272
273
$data = [];
@@ -274,7 +276,11 @@ protected function doReplace(array $urls)
274
276
}
275
277
try {
278
$this->insertMultiple($data);
279
280
+ $this->connection->commit();
281
} catch (\Magento\Framework\Exception\AlreadyExistsException $e) {
282
+ $this->connection->rollBack();
283
284
/** @var \Magento\UrlRewrite\Service\V1\Data\UrlRewrite[] $urlConflicted */
285
$urlConflicted = [];
286
foreach ($urls as $url) {
0 commit comments