Error 0 Attempt To Assign Property "image" On Null - Question | JoomShaper

Error 0 Attempt To Assign Property "image" On Null

RA

Rafael Alvarez

EasyStore 4 months ago

Hi

We are using

  • Joomla 4.4.1
  • PHP 8.1
  • EasyStore 1.0.7
  • SPPB pro 5.2.4
  • Helix Ultimate

If we do delete a product that will not be used anymore or delete and re-create, when customer access the shopping cart and go to "my orders", the following error will be displayed and no access to "my orders" from web page:

Error 0 Attempt to assign property "image" on null

If deleting the order that has product that does not exist (cause deleted) then it can be access.

Is normal that in a shop online some products dissapear, so should be able to show the Orders without image at least instead breaking it. Please check.

Steps

  1. Create order.
  2. Go to orders in frontend, orders will be displayed Ok
  3. Delete product
  4. Go to "my orders" from frontend, error will appear and no page will be shown.
  5. Create similar product or same product (will have another ID), same problem
  6. Delete the order in administrator backend with the product without image.
  7. Orders will be shown.

Best Regards

0
7 Answers
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 4 months ago #144177

Hello Rafael Alvarez

I have followed this steps.

  1. Created an order from the admin.
  2. Checked in the frontend.
  3. Deleted the product.
  4. Order is okay on the frontend. No issues are there. Just the image and product name is gone. https://prnt.sc/5j9bxjHQHTPo

Best regards

0
RA
Rafael Alvarez
Accepted Answer
4 months ago #144178

Hi Ofi:

Maybe a caché issue ? Is extrange. I will try to reproduce and let you know.

Best Regards

0
RA
Rafael Alvarez
Accepted Answer
4 months ago #144314

Hi Ofi

It worked for you cause you did not completely deleted the product, just trashed it, so the product registry still exists on the database.

If you filter the product by "trashed elements" and then delete it by selecting and emptying trash, the issue will hapen.

Please see captured image at the hidden content.

Best Regards

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 4 months ago #144331

Thanks for the clarification and sharing the bug. I have got the issue and shared it with the team. It will be fixed in the next release.

1
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 4 months ago #144540

Sorry, it is not fixed in the next update. But we will restrict the admin to delete any product that is associated with an order.

0
RA
Rafael Alvarez
Accepted Answer
4 months ago #144571

Hi Ofi,

Thanks for your response.

I do not think this is a good idea, cause you might want to delete or re-create products with the same description during the store activity.

I do not understand why is needed to keep on the trash.

Admin user can see the orders no matter if product is deleted or not.

Best Reg

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 4 months ago #144662

It is not the permanent solution. We will fix it in the later versions. But for the latest version (available now on downloads) it will be restricted.

1