Jump to content

500 error after order validation


Recommended Posts

Hello ,

I recently was testing my website order steps to see if the event tracking are working for facebook pixel , i found out by chance that in the last step of the checkout after choosing the payment method , and after hiting confirm order i find my self with 500 error , the url of order validation should redirect me to the order confirmation page , despite the fact that the order is recieved successfully to my backoffice , but without any intial status . i tried all the three payment methods and the result in the same (COD , transfert and cheque)

this is the error that i found after activating the debug mode

(when i activate the debug mode i can't change the order status)

[Symfony\Component\Debug\Exception\ContextErrorException kod 0]: Notice: Trying to get property 'id' of non-object

 

This is the error that i found in the order validation page  :

screencapture-file-C-Users-l-Documents-Stardust-tn-validation-htm-2024-04-08-09_46_28.thumb.png.921a6575c6f42995dd5b20e9644740d1.png

I found this solution in another topic to change this file PrestaShop/classes/order/Order.php 

change this line "if ($this->current_state) { return new OrderState($this->current_state);"

to this

" if ($this->current_state !== "") { return new OrderState($this->current_state);"

this solution helped me change the order status but still have the error 500 in the validation step of the order .

 

Anyone have an idea please ?

 

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...