gpt4 book ai didi

magento2 - 您不能多次定义关联名称 'links'

转载 作者:行者123 更新时间:2023-12-02 00:39:49 27 4
gpt4 key购买 nike

您好,先谢谢您。

我在 Magento 2.3 的产品页面中有一个错误:您不能多次定义关联名称“链接”

追踪:

{"0":"You cannot define a correlation name 'links' more than once","1":"#0 /home/buybionette/public_html/vendor/magento/framework/DB/Select.php(298): Zend_Db_Select->_join('inner join', Array, 'links.linked_pr...', Array, NULL)\n#1 /home/buybionette/public_html/vendor/magento/zendframework1/library/Zend/Db/Select.php(357): Magento\Framework\DB\Select->_join('inner join', Array, 'links.linked_pr...', Array, NULL)\n#2 /home/buybionette/public_html/vendor/magento/zendframework1/library/Zend/Db/Select.php(336): Zend_Db_Select->joinInner(Array, 'links.linked_pr...', Array, NULL)\n#3 /home/buybionette/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Link/Product/Collection.php(230): Zend_Db_Select->join(Array, 'links.linked_pr...', Array)\n#4 /home/buybionette/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Link/Product/Collection.php(184): Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection->_joinLinks()\n#5 /home/buybionette/public_html/vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php(917): Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection->_beforeLoad()\n#6 /home/buybionette/public_html/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php(790): Magento\Eav\Model\Entity\Collection\AbstractCollection->load(false, false)\n#7 /home/buybionette/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Catalog\Model\ResourceModel\Product\Collection->load(false, false)\n#8 /home/buybionette/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection\Interceptor->___callParent('load', Array)\n#9 /home/buybionette/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection\Interceptor->Magento\Framework\Interception\{closure}()\n#10 /home/buybionette/public_html/generated/code/Magento/Catalog/Model/ResourceModel/Product/Link/Product/Collection/Interceptor.php(390): Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection\Interceptor->___callPlugins('load', Array, Array)\n#11 /home/buybionette/public_html/vendor/magento/framework/Data/Collection.php(832): Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection\Interceptor->load()\n#12 /home/buybionette/public_html/generated/code/Magento/Catalog/Model/ResourceModel/Product/Link/Product/Collection/Interceptor.php(1961): Magento\Framework\Data\Collection->getIterator()\n#13 /home/buybionette/public_html/vendor/magento/module-catalog/Block/Product/ProductList/Related.php(137): Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection\Interceptor->getIterator()\n#14 /home/buybionette/public_html/generated/code/Magento/Catalog/Block/Product/ProductList/Related/Interceptor.php(37): Magento\Catalog\Block\Product\ProductList\Related->getIdentities()\n#15 /home/buybionette/public_html/vendor/magento/module-page-cache/Model/Layout/LayoutPlugin.php(71): Magento\Catalog\Block\Product\ProductList\Related\Interceptor->getIdentities()\n#16 /home/buybionette/public_html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\PageCache\Model\Layout\LayoutPlugin->afterGetOutput(Object(Magento\Framework\View\Layout\Interceptor), '\n Magento\Framework\Interception\{closure}()\n#18 /home/buybionette/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)\n#19 /home/buybionette/public_html/vendor/magento/framework/View/Result/Page.php(258): Magento\Framework\View\Layout\Interceptor->getOutput()\n#20 /home/buybionette/public_html/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))\n#21 /home/buybionette/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))\n#22 /home/buybionette/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)\n#23 /home/buybionette/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))\n#24 /home/buybionette/public_html/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)\n#25 /home/buybionette/public_html/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))\n#26 /home/buybionette/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()\n#27 /home/buybionette/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()\n#28 /home/buybionette/public_html/index.php(40): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))\n#29 {main}","url":"/bionette.html","script_name":"/index.php"}

这是一个非常基本的站点,没有特殊的模块或主题。

谢谢你,伊兰

最佳答案

https://community.magento.com/t5/Magento-2-x-Technical-Issues/Magento-2-3-Inventory-stock-1-doesn-t-Exist-On-Magento-2-3/td-p/120679

由 PankajS_Magento

这是在 DB SQL 中运行的命令,确保更新 dbname。

CREATE ALGORITHM = UNDEFINED SQL SECURITY 
INVOKER VIEW `inventory_stock_1` AS
select distinct `legacy_stock_status`.`product_id` AS `product_id`,
`legacy_stock_status`.`website_id` AS `website_id`,
`legacy_stock_status`.`stock_id` AS `stock_id`,
`legacy_stock_status`.`qty` AS `quantity`,
`legacy_stock_status`.`stock_status` AS `is_salable`,
`product`.`sku` AS `sku`
from (`dbname`.`cataloginventory_stock_status` `legacy_stock_status`
join `dbname`.`catalog_product_entity` `product`
on ((`legacy_stock_status`.`product_id` = `product`.`entity_id`)));

关于magento2 - 您不能多次定义关联名称 'links',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55001060/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com