-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Can't place order because Sequence::getNextValue() crashes #3066
Comments
@Desmaster : That issue because have some new work flow of sales module in Magento 2. |
Completely agree here \Magento\SalesSequence\Model\ResourceModel\Meta::loadByEntityTypeAndStore() is feeding data to \Magento\SalesSequence\Model\Manager getSequence() method should throw Exception if meta is not found |
MAGETWO-52506 |
Sorry for late reply. I assume you did not migrate settings before data migration |
@victor-v-rad - no I didn't migrate settings - is there any reference in the settings migration to recreate sequence tables? |
When you migrate settings you migrate stores and websites. Skipping this probably causes the issue with sequence tables. Please stick close to the official documentation |
@victor-v-rad thanks for the tip, I will try that and check I was looking in the code and the Settings Step actually is copying data between core_config_data tables only - unless I miss something obvious https://github.com/magento/data-migration-tool/blob/master/src/Migration/Step/Settings/Data.php |
See in |
Thanks for pointing that, Settings mode consists of two steps - settings and stores So actual task is here - https://github.com/magento/data-migration-tool/blob/master/src/Migration/Step/Stores/Data.php#L66 But again - this is just simple data copy between 3 tables hardcoded in helper Still don't see how sequence tables will be created by this step @victor-v-rad please advice |
Sequence tables are created here \Migration\Step\SalesIncrement\Data::createSequenceTable |
@victor-v-rad thanks - that's fine, but what if someone is not actually want to migrate orders? What do you think? |
Dependencies exist. You cannot migrate only orders by the tool out of the box |
@victor-v-rad I think you mean opposite - that you need to migrate orders always to make sure that sequence tables are generated |
I got this bug without any "migrate" operations. I just created second store for tutorial tasks and this bug occured. |
please use one of the following:
|
@victor-v-rad my development database does not have any orders in it due to PCI complaince. The sequence tables for stores > 1 are never created. |
Hi @tdgroot the issued has been fixed in 2.1.8. Please, let us know if you still have the issue |
Some information good to know:
The method
Magento\SalesSequence\Model\Sequence->getNextValue()
crashes.It looks like this:
$this->meta->getSequenceTable()
returnsNULL
, causing the adapter to do the following:This obviously doesn't work, thus the whole order creation crashes.
What could possibly cause
$this->meta->getSequenceTable()
to return NULL?The text was updated successfully, but these errors were encountered: