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

First two orders with sample data fail #1452

Closed
markshust opened this issue Jul 8, 2015 · 5 comments
Closed

First two orders with sample data fail #1452

markshust opened this issue Jul 8, 2015 · 5 comments
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update

Comments

@markshust
Copy link
Contributor

There are two existing orders within the sample data, and the foreign key isn't correctly being set within it, because the first two test orders placed within an install with sample data fail:

screen shot 2015-07-07 at 11 25 20 pm

[2015-07-08 03:24:52] main.CRITICAL: exception 'Zend_Db_Statement_Exception' with message 'Report ID: webapi-559c9804af122; Message: SQLSTATE[23000]: Integrity constraint viola
tion: 1062 Duplicate entry '000000001-1' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID', query was: INSERT INTO `sales_order` (`state`, `status`, `protect_code`, `shipping_descrip
tion`, `is_virtual`, `store_id`, `customer_id`, `base_discount_amount`, `base_grand_total`, `base_shipping_amount`, `base_shipping_tax_amount`, `base_subtotal`, `base_tax_amoun
t`, `base_to_global_rate`, `base_to_order_rate`, `discount_amount`, `grand_total`, `shipping_amount`, `shipping_tax_amount`, `store_to_base_rate`, `store_to_order_rate`, `subto
tal`, `tax_amount`, `total_qty_ordered`, `customer_is_guest`, `customer_note_notify`, `customer_group_id`, `quote_id`, `base_subtotal_incl_tax`, `base_total_due`, `subtotal_inc
l_tax`, `total_due`, `weight`, `increment_id`, `applied_rule_ids`, `base_currency_code`, `customer_email`, `customer_firstname`, `customer_lastname`, `customer_middlename`, `gl
obal_currency_code`, `order_currency_code`, `remote_ip`, `shipping_method`, `store_currency_code`, `store_name`, `total_item_count`, `discount_tax_compensation_amount`, `base_d
iscount_tax_compensation_amount`, `shipping_discount_tax_compensation_amount`, `base_shipping_discount_tax_compensation_amnt`, `discount_tax_compensation_invoiced`, `base_disco
unt_tax_compensation_invoiced`, `discount_tax_compensation_refunded`, `base_discount_tax_compensation_refunded`, `shipping_incl_tax`, `base_shipping_incl_tax`, `gift_message_id
`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?)' in /var/www/html/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:194
Stack trace:
#0 /var/www/html/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Zend_Db_Statement_Exception))
#1 /var/www/html/app/code/Magento/Webapi/Controller/Rest.php(191): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Zend_Db_Statement_Exception))
#2 /var/www/html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/html/lib/internal/Magento/Framework/App/Http.php(115): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /var/www/html/lib/internal/Magento/Framework/App/Bootstrap.php(257): Magento\Framework\App\Http->launch()
#5 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 {main} [] []

[2015-07-08 03:26:05] main.CRITICAL: exception 'Zend_Db_Statement_Exception' with message 'Report ID: webapi-559c984dc2f17; Message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '000000002-1' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID', query was: INSERT INTO `sales_order` (`state`, `status`, `protect_code`, `shipping_description`, `is_virtual`, `store_id`, `customer_id`, `base_discount_amount`, `base_grand_total`, `base_shipping_amount`, `base_shipping_tax_amount`, `base_subtotal`, `base_tax_amount`, `base_to_global_rate`, `base_to_order_rate`, `discount_amount`, `grand_total`, `shipping_amount`, `shipping_tax_amount`, `store_to_base_rate`, `store_to_order_rate`, `subtotal`, `tax_amount`, `total_qty_ordered`, `customer_is_guest`, `customer_note_notify`, `customer_group_id`, `quote_id`, `base_subtotal_incl_tax`, `base_total_due`, `subtotal_incl_tax`, `total_due`, `weight`, `increment_id`, `applied_rule_ids`, `base_currency_code`, `customer_email`, `customer_firstname`, `customer_lastname`, `customer_middlename`, `global_currency_code`, `order_currency_code`, `remote_ip`, `shipping_method`, `store_currency_code`, `store_name`, `total_item_count`, `discount_tax_compensation_amount`, `base_discount_tax_compensation_amount`, `shipping_discount_tax_compensation_amount`, `base_shipping_discount_tax_compensation_amnt`, `discount_tax_compensation_invoiced`, `base_discount_tax_compensation_invoiced`, `discount_tax_compensation_refunded`, `base_discount_tax_compensation_refunded`, `shipping_incl_tax`, `base_shipping_incl_tax`, `gift_message_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' in /var/www/html/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php:194
Stack trace:
#0 /var/www/html/lib/internal/Magento/Framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Zend_Db_Statement_Exception))
#1 /var/www/html/app/code/Magento/Webapi/Controller/Rest.php(191): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Zend_Db_Statement_Exception))
#2 /var/www/html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/html/lib/internal/Magento/Framework/App/Http.php(115): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /var/www/html/lib/internal/Magento/Framework/App/Bootstrap.php(257): Magento\Framework\App\Http->launch()
#5 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 {main} [] []
@vpelipenko vpelipenko added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development CS bug report labels Jul 8, 2015
@vpelipenko vpelipenko added MX and removed CS labels Jul 16, 2015
@vpelipenko
Copy link
Contributor

Internal ticket: MAGETWO-39205

@vpelipenko
Copy link
Contributor

@markoshust, we've fixed this issue. Please, try to reinstall system with sample data again, but before you need to clean composer cache (if you already have installed 1.0.0-beta with sample data), sample data package was updated, but its version is not changed.

@markshust
Copy link
Contributor Author

Confirmed fixed, thanks!

@surfer190
Copy link

What is the fix here? I am facing the same problem on data migrated from magento 1 to magento 2

magento-team pushed a commit that referenced this issue Sep 5, 2017
@victortodoran
Copy link

@surfer190 Did you manage to fix this ? I have the same issue after a data migration

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Jan 19, 2018
magento-engcom-team added a commit that referenced this issue Mar 15, 2018
 - Merge Pull Request magento-engcom/magento2ce#1452 from magento-engcom/magento2ce:codetriage-badge-2.3
 - Merged commits:
   1. 80bd425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update
Projects
None yet
Development

No branches or pull requests

5 participants