magepow/sameidalreadyexists

Magento 2 SameIDAlreadyExists 防止重复的 entity_id

1.0.0 2022-08-27 07:23 UTC

This package is auto-updated.

Last update: 2024-08-30 01:39:39 UTC


README

Magento 2 SameIDAlreadyExists(存在相同ID "X" 已存在)

有时您可能在日志 var/log/debug.log 或 var/log/system.log 中遇到以下错误

Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "X" already exists.

or

Item (Magento\Catalog\Model\Category\Interceptor) with the same ID "X" already exists.

or

Item (Magento\Customer\Model\Customer\Interceptor) with the same ID "X" already exists

该错误可能在您从 Magento 1 迁移数据库到 Magento 2 或其他操作时出现。错误原因是数据库中存在重复的 entity_id。您可以使用命令或安装 SameIDAlreadyExists 忽略它。如果您想修复数据库中重复的问题,您可以使用此处提供的扩展来检测它 Url 数据完整性检查模块 for Magento 2

安装 Magento 2 SameIDAlreadyExists

Latest Stable Version Total Downloads Daily Downloads

通过 composer 安装(推荐)

在 Magento 2 根目录中运行以下命令

composer require magepow/sameidalreadyexists
php bin/magento module:enable Magepow_SameIDAlreadyExists
php bin/magento cache:flush