Jump to content

Can't view an order in Back Office - Error 500 - Prestashop 8.0.4


Recommended Posts

Hi!

When I logged in at the Back Office and went to the Control Panel, I can see that there is "1" Pending order.

So I clicked on "Orders" in the left side menu and it can't be found in the list.

I then went to "Carts" under Orders > Carts, and there I can se a successfully checked out cart.

I click on the cart and can see that there is one active order for the customer (which is a new customer that has not bought anything before).

I try to click on the order but unfortunately there is a error 500.

Activated debug mode and the error 500 message is as following:

Warning: Trying to access array offset on value of type null

ErrorException

in src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php (line 363)
GetOrderForViewingHandler->getOrderInvoiceAddress(object(Order))

in src/Adapter/Order/QueryHandler/GetOrderForViewingHandler.php (line 191)

in vendor/league/tactician/src/Handler/CommandHandlerMiddleware.php -> handle (line 71)

in vendor/league/tactician/src/CommandBus.php -> execute (line 62)

CommandBus->League\Tactician\{closure}(object(GetOrderForViewing))

in src/Core/CommandBus/Middleware/CommandRegisterMiddleware.php (line 79)

in vendor/league/tactician/src/CommandBus.php -> execute (line 62)

in vendor/league/tactician/src/CommandBus.php -> League\Tactician\{closure} (line 42)

CommandBus->handle(object(GetOrderForViewing))

in src/Core/CommandBus/TacticianCommandBusAdapter.php (line 54)

TacticianCommandBusAdapter->handle(object(GetOrderForViewing))

in src/PrestaShopBundle/Controller/Admin/Sell/Order/OrderController.php (line 420)

in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php -> viewAction (line 169)

in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php -> handleRaw (line 81)

in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php -> handle (line 201)

Kernel->handle(object(Request), 1, false)

in ADMIN/index.php (line 81)

------------

What could be causing this?

I have Prestashop 8.0.4 with PHP 8.0.

I started out with Prestashop 1.7 several years ago and have kept the system updated all the time.

It has never been migrated from 1.5 or 1.6.

Thanks in advance.

Best regards,

Jonte

Link to comment
Share on other sites

Hi,

The order was made "unfortunately", the cart is green (on the carts list) and successfull checkout, The order is associated with the cart and the customer, but cannot be opened. Also, the order was successfully made in the payment gateway.

Best regards,

Link to comment
Share on other sites

12 hours ago, Jontee said:

I click on the cart and can see that there is one active order for the customer (which is a new customer that has not bought anything before).

Only one incident? If those keep coming you better look into your error log and PHP version changes. 

Link to comment
Share on other sites

Hi,

The PHP version is 8.0.28 currently. Just updated to Prestashop 8.0.4 the other week.

Any idea how I may view the order and associated invoice etc.? Based on the debug error message.

Thanks in advance.

Link to comment
Share on other sites

4 hours ago, Jontee said:

Hi,

The PHP version is 8.0.28 currently. Just updated to Prestashop 8.0.4 the other week.

You shouldn't update without a checking if all modues work. Try to set it back restart apatche if possible.

Link to comment
Share on other sites

1 hour ago, Nickz said:

try thirtybees, its a prestaclone.

come on man, that is a piece of crap, no template inheritance, they should have cloned PS after that feature was introduced...no new themes, no new modules...like living in the past.  prestaclone of very old version of PS missing again template inheritance...you do like to delete/change front office content yes?  not just add...drop and give me 100 pushups.  before recommending 30stings, just tell them to use shopify.

to original poster, here is a link to github with various infos on this problem, there are more github issues similar...but when searching, use the search 'PrestaShop github (error message).  

https://github.com/PrestaShop/PrestaShop/issues/22215

Link to comment
Share on other sites

2 hours ago, PrestaHeroes USA said:

come on man, that is a piece of crap, no template inheritance, they should have cloned PS after that feature was introduced...no new themes, no new modules...like living in the past.

If it suits the need of the client?
For what reason you need a lot of themes if you can adapt one towards your needs?

More modules rieskier it becomes of having a backdoor open. 

Is for you the future a lot of modules and 10 000 themes to choose from? Look at the shops in mobile view and most look similar.

Link to comment
Share on other sites

Where in the database can I find the invoice for that order? I can see the order on the control panel homepage when logging in to BO, it is also there for the cart and customer, but can't be viewed (error 500). Maybe the payment processor (I only have one) didn't return the address somehow, to the Prestashop system?

Best regards,

Link to comment
Share on other sites

22 minutes ago, Jontee said:

Do you know where to look for the supposedly missing address in the database, associated to that order?

2 ways, one over query there you have to know the table (column) if I'm not mistaken. 2nd create a db dump and search over a text program for the number and find the table.

Edited by Nickz (see edit history)
Link to comment
Share on other sites

Line 363 from your error message is point to country name in the language of the order - so check the country and order language settings, something is missing/inconsitent there.

grafik.png.53be38203dfc8eace503b9e0e7cd5a69.png 

Link to comment
Share on other sites

  • 2 weeks later...

Another notice, I took the order number for that order and put it in the URL to generate the invoice in BO, and it worked, but the delivery address and invoice address were both missing completely.

Best regards,

Link to comment
Share on other sites

On 5/27/2023 at 8:42 AM, Jontee said:

Another notice, I took the order number for that order and put it in the URL to generate the invoice in BO, and it worked, but the delivery address and invoice address were both missing completely.

Best regards,

best advice?  if not to much invested, install 1.7.8.7 it's stable.  You are what we call earlier adopter, remember PS is community tested, issues are made on github and it takes time for a useable/stable new major version is stable.  

Link to comment
Share on other sites

On 5/19/2023 at 2:55 PM, JBW said:

Line 363 from your error message is point to country name in the language of the order - so check the country and order language settings, something is missing/inconsitent there.

grafik.png.53be38203dfc8eace503b9e0e7cd5a69.png 

So did you check the country and order language?

Link to comment
Share on other sites

18 hours ago, Jontee said:

Hi,

I was just trying to make an export of the database and find the order, I will get back with the results, if those fields are missing any values.

Thanks.

Best regards,

good lawd, is this a hobby project?  get 1787, you dont have knowledge to be early adopter...don't ignore the elders, I gave you best advice up above, dont use this

Link to comment
Share on other sites

But this problem has been with all versions of 1.7 as well? Not just the latest 8.0.x branch unfortunately.

I think I have found those values missing in the database, addresses, for affected orders. Maybe it has something to do with the payment module not returning all those field values in time (or something). I will see if adding the values (address) makes the order viewable in BO.

Thanks.

Link to comment
Share on other sites

  • 1 month later...

Can anyone help ? This may not be the right page but I am new to this...  

I cannot access PS 1.7 BO at all have tried every fix, just happened after clearing caches. It is the following errors — ServiceNot FoundException “prestashop.adapter.product.options.redirect_target_provider” has a dependancy on a non-existant serivce “prestashop.adapter.product.repository.product_preview_repository”

the front end works fine. have even restored the server to a previous backup that worked, but this error still occurs ??

I have tried all the fixes possible from everywhere, this just happened when cleared the cache files, but have restored server from working site and this still happnes ?

see attched error file when trying to debug the BO accesspage

Bo error login.jpg

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...