vegandthecity / magento

vegandthecity.ch/shop (Magento 2) source code and issues tracking
https://upwork.com/fl/mage2pro
1 stars 2 forks source link

«The category doesn't contain the specified product» / «Die Kategorie enthält nicht das angegebene Produkt» #28

Open dmitrii-fediuk opened 4 years ago

dmitrii-fediuk commented 4 years ago
#1 Magento\Catalog\Model\CategoryLinkManagement->assignProductToCategories() called at [vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php:146]
#2 Magento\Catalog\Controller\Adminhtml\Product\Save->execute() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#3 Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#4 Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#5 Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callPlugins() called at [generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php:26]
#6 Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#7 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/module-backend/App/AbstractAction.php:231]
#8 Magento\Backend\App\AbstractAction->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#9 Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#10 Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143]
#11 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#12 Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#13 Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->___callPlugins() called at [generated/code/Magento/Catalog/Controller/Adminhtml/Product/Save/Interceptor.php:39]
#14 Magento\Catalog\Controller\Adminhtml\Product\Save\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159]
#15 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:99]
#16 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#17 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#18 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#19 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#20 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#21 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#22 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:40]
dmitrii-fediuk commented 4 years ago

I have implemented a logging in vendor/magento/module-catalog/Model/CategoryLinkRepository.php

sherazkhan302 commented 2 years ago

If there are multiple websites, Try to assign the product to that website first and then try again to update the product category.

vendor/magento/module-catalog/Model/ResourceModel/Category.php::getProductsPosition, I guess it's sending wrong $websiteId