-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Upgrade to Magento 2.2.5 with patches in place. Area code is not set in Magento_Sales fillQuoteAddressIdInSalesOrderAddress #17434
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
Comments
Hi @daniel-ifrim. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @daniel-ifrim do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
@magento-engcom-team give me 2.2.2 instance |
Hi @daniel-ifrim. Thank you for your request. I'm working on Magento 2.2.2 instance for you |
Hi @daniel-ifrim, here is your Magento instance. |
It seems, I will have to try to reproduce the issue on my system using vanilla Magento 2.2.2 and do the steps. |
Btw, it looks to me like fillQuoteAddressIdInSalesOrderAddress() from UpgradeData should work with SQL queries $connection->update(), $connection->select() .. instead of accessing and saving data through entire models and classes. It modifies one column data in a table and updates old orders. |
Hello @daniel-ifrim, thank you for your report. |
@engcom-backlog-nickolas I believe this issue is related to #14964 see the last 2 comments. |
@rparsi This issue is related to what it describes. It's not related to email address or nullable columns. |
@daniel-ifrim, thank you for your report. Unfortunately, we are archiving this ticket now as it did not get much attention from both Magento Community and Core developers for an extended period. This is done in an effort to create a quality, community-driven backlog which will allow us to allocate the required attention more easily. Please feel free to comment, reopen or create new ticket according to the Issue reporting guidelines |
Uh oh!
There was an error while loading. Please reload this page.
Preconditions
Steps to reproduce
composer update -vvv
php bin/magento setup:upgrade
UpgradeData.php
, functionfillQuoteAddressIdInSalesOrderAddress()
throws an errorArea code is not set
.Expected result
Actual result
php bin/magento setup:upgrade
failsI guess I've been doing the upgrade slightly differently.
I run
php bin/magento setup:upgrade
after applying the 2 patches.In future releases, upgrading from a previous Magento 2 version could fail because of this error.
The error is triggered in
vendor/magento/framework/Session/SidResolver.php
, function getSid():Even if fillQuoteAddressIdInSalesOrderAddress is called in an emulated area with area code set:
it stills fails because in Magento\Framework\Session\SidResolver $this->appState is a Magento style "singleton"/shared class:
$this->appState = $appState ?: \Magento\Framework\App\ObjectManager::getInstance()->get(State::class);
where in
UpgradeData.php
, $this->state is a new instance of the same class.Area code is not seen in $this->appState from SidResolver class.
I guess the fix is something like:
in
__construct()
,vendor/magento/module-sales/Setup/UpgradeData.php
.Or declare the
state
parameter as shared in di.xml, arguments of UpgradeData.php.This works for me. I am not assuming it is a perfect solution that does not has the potential to impact the other Magento 2 modules setup upgrade.
The text was updated successfully, but these errors were encountered: