Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on order success page #75

Open
munkhulzii opened this issue Jun 29, 2022 · 8 comments
Open

Error on order success page #75

munkhulzii opened this issue Jun 29, 2022 · 8 comments

Comments

@munkhulzii
Copy link

I get following error on order success page:
Error: Call to undefined method Magento\Sales\Api\Data\OrderExtension::setSources() in vendor/ampersand/magento2-disable-stock-reservation/src/Plugin/Model/OrderRepositoryPlugin.php:135.

And I do not see the functions setSources and getSources in the generated class generated/code/Magento/Sales/Api/Data/OrderExtension.php.

What could it be? Magento is in version 2.4.3. Module in version 1.1.4 is correctly installed and activated.

@convenient
Copy link
Contributor

We've not seen this before.

Could you include a full stack trace?

@munkhulzii
Copy link
Author

[2022-06-29 15:32:00] main.CRITICAL: Error: Call to undefined method Magento\Sales\Api\Data\OrderExtension::setSources() in vendor/ampersand/magento2 -disable-stock-reservation/src/Plugin/Model/OrderRepositoryPlugin.php:135 Stack trace: #0 vendor/ampersand/magento2-disable-stock-reservation/src/Plugin/Model/OrderRepositoryPlugin.php(85): Ampersand\DisableStockReservation\Plugin\Model \OrderRepositoryPlugin->applyExtensionAttributesToOrder() #1 vendor/magento/framework/Interception/Interceptor.php(146): Ampersand\DisableStockReservation\Plugin\Model\OrderRepositoryPlugin->afterGet() #2 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\OrderRepository\Interceptor->Magento\Framework\Interception\{closu re}() #3 generated/code/Magento/Sales/Model/OrderRepository/Interceptor.php(23): Magento\Sales\Model\OrderRepository\Interceptor->___callPlugins() #4 vendor/magento/module-inventory-in-store-pickup-sales/Model/IsStorePickupOrder.php(47): Magento\Sales\Model\OrderRepository\Interceptor->get() #5 vendor/magento/module-inventory-in-store-pickup-frontend/Block/Checkout/Onepage/Success/IsOrderStorePickup.php(47): Magento\InventoryInStorePickup Sales\Model\IsStorePickupOrder->execute() #6 vendor/magento/module-inventory-in-store-pickup-frontend/view/frontend/templates/success.phtml(15): Magento\InventoryInStorePickupFrontend\Block\C heckout\Onepage\Success\IsOrderStorePickup->execute() #7 vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/var/www/...') #8 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\TemplateEngine\Php->render() #9 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent() #10 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception \{closure}() #11 generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php(23): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugi ns() #12 vendor/magento/framework/View/Element/Template.php(273): Magento\Framework\View\TemplateEngine\Php\Interceptor->render() #13 vendor/magento/framework/View/Element/Template.php(303): Magento\Framework\View\Element\Template->fetchView() #14 vendor/magento/framework/View/Element/AbstractBlock.php(1114): Magento\Framework\View\Element\Template->_toHtml() #15 vendor/magento/framework/View/Element/AbstractBlock.php(1118): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{clos ure}() #16 vendor/magento/framework/View/Element/AbstractBlock.php(678): Magento\Framework\View\Element\AbstractBlock->_loadCache() #17 vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml() #18 vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock() #19 vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement() #20 vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement() #21 vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer() #22 vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement() #23 vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement() #24 vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer() #25 vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement() #26 vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement() #27 vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer() #28 vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement() #29 vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement() #30 vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer() #31 vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement() #32 vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement() #33 vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer() #34 vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement() #35 vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout->renderElement() #36 vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer() #37 vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout->renderNonCachedElement() #38 vendor/magento/framework/View/Layout.php(975): Magento\Framework\View\Layout->renderElement() #39 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput() #40 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent() #41 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() #42 generated/code/Magento/Framework/View/Layout/Interceptor.php(41): Magento\Framework\View\Layout\Interceptor->___callPlugins() #43 vendor/magento/framework/View/Result/Page.php(260): Magento\Framework\View\Layout\Interceptor->getOutput() #44 vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render() #45 vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult() #46 vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent() #47 app/code/Amasty/PageSpeedOptimizer/Plugin/ProcessPageResult.php(40): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Intercepti on\{closure}() #48 vendor/magento/framework/Interception/Interceptor.php(135): Amasty\PageSpeedOptimizer\Plugin\ProcessPageResult->aroundRenderResult() #49 app/code/Magezon/Core/Plugin/View/Result/Layout.php(24): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure} () #50 vendor/magento/framework/Interception/Interceptor.php(135): Magezon\Core\Plugin\View\Result\Layout->aroundRenderResult() #51 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closu re}() #52 generated/code/Magento/Framework/View/Result/Page/Interceptor.php(23): Magento\Framework\View\Result\Page\Interceptor->___callPlugins() #53 vendor/magento/framework/App/Http.php(120): Magento\Framework\View\Result\Page\Interceptor->renderResult() #54 vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch() #55 pub/index.php(37): Magento\Framework\App\Bootstrap->run()

@munkhulzii
Copy link
Author

The issue was solved by next deployment. So it looks like the first installation does not work fully. Maybe it was a issue with composer autoloader.

Issue can be closed.

@convenient
Copy link
Contributor

thanks @munkhulzii very strange, perhaps something going fishy with your atomic deployments?

@joachimVT
Copy link

Hi @munkhulzii I had the exact same issue on Magento 2.4.3. Tried a full new deploy but still the same issue. How did you solve this ?

@munkhulzii
Copy link
Author

munkhulzii commented Jul 20, 2022

@joachimVT
For me was the issue solved by next deployment.

Something wrong with composer autoloader and di:compile. Maybe try "compose install" 2 times during the deploy. Just run in a row.

@VivekShingala
Copy link

The issue was solved by next deployment. So it looks like the first installation does not work fully. Maybe it was a issue with composer autoloader.

Issue can be closed.

I also faced the same issue and resolved using re-deployment. Thank you

@nkajic
Copy link

nkajic commented Jul 11, 2024

Just to confirm. Works on local development but not on live until secound deployment. Magento v2.4.4 using deployer(.org)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants