We have an issue when we are trying to complete shipment.

We have the "email copy of Shipment" box checked. And when we click "submit shipment" we receive these two error messages: "cannot do shipment for the order" and "Invalid security or form key, please refresh the page"

But the shipment is completed and the email copy is sent. I have checked the log and reports folder for any errors but nothing that indicates there is an issue at all.

Anyone that knows what causes this? Is not that bad, but since our client thinks there is something wrong when this is happening.

Any help is appreciated.,

1 Answer 1

  1. Check the purchased items table inside the order if they have item-status: canceled.
  2. If not, check in Configuration->Catalog->Inventory "Decrease Stock When Order is Placed" if it is set to No. When you have this set to "No", Magento will decrease the stock on shipment creation and if an item is already out of stock, you will get the "cannot do shipment for the order" message.
  • Thanks for the reply. I'm not 100% sure what you mean by step one.. Where can I see this? I checked step to and this is set to yes. Dec 13, 2020 at 22:42
  • In admin, go to Sales-Orders, open the specific order and in the items purchased table (the table that lists the purchased products), there should be an "item Status" column.
    – dimitraros
    Dec 13, 2020 at 23:10
  • aah okay, i checked there, the status is on pending. We do not get this error when we do not send a copy of the email shipment. Dec 13, 2020 at 23:11
  • If it happens only when you tick the send copy option, then i would look for errors in 2 places: 1) Your custom "New Shipment" email template (if you have created one) 2) If you check the send copy option in order to send tracking information, then check if there is custom code for the tracking No (design\frontend\templates\email\shipment\track.phtml) or maybe a module?
    – dimitraros
    Dec 13, 2020 at 23:23
  • Have you checked your log files?
    – dimitraros
    Dec 13, 2020 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.