eckmar-community / eckmar

Open-source marketplace on Laravel (PHP). Also known as the Eckmar's Marketplace Script.
104 stars 60 forks source link

Wishlist issue - Product delivery status issue #55

Open desoasl44 opened 1 year ago

desoasl44 commented 1 year ago

Currently trying all pages to see if everything's working but seems like the wishlist throw an error if you try to check it once you added products to it, it's working when it's empty tho.

image

Also got an error trying to mark product as delivered. It might be due to the fact amount isn't paid but I'm not 100% sure since it's actually possible to send the delivery even if not paid.

image

Thanks in advance for the help

Gralien commented 1 year ago

Q1 Again, locations, permissions, and ownership of files and directories? Laravel log reporting anything?

Q2 You are using STB, really? A local node? Is the version correct? Are you RPC'ing to your own local node over TOR? I'm going to say that the funds are actually paid, it says that they are...the digital product is delivered as "test". Pretty sure that when its "Automatic Delivery" its automatically marked as delivered? If the address in question had not received enough coin, the script wouldn't have delivered the product? Ill verify that and come back if untrue.

In the future please don't combine issues into multi-threaded questions. One problem issue.

desoasl44 commented 1 year ago

Thanks for your quick answer @Gralien .

A1. Here is the line from the laravel logs matching the error.

[2022-11-14 17:02:16] local.ERROR: Call to a member function frontImage() on null (View: /var/www/peralta/resources/views/includes/product/card.blade.php) (View: /var/www/peralta/resources/views/includes/product/card.blade.php) {"userId":"6a9604e0-643b-11ed-8e82-9972f6185cee","exception":"[object] (ErrorException(code: 0): Call to a member function frontImage() on null (View: /var/www/peralta/resources/views/includes/product/card.blade.php) (View: /var/www/peralta/resources/views/includes/product/card.blade.php) at /var/www/peralta/storage/framework/views/e87d8c383716cff1e61362d338b1bf6cf4fdeb9d.php:2, ErrorException(code: 0): Call to a member function frontImage() on null (View: /var/www/peralta/resources/views/includes/product/card.blade.php) at /var/www/peralta/storage/framework/views/e87d8c383716cff1e61362d338b1bf6cf4fdeb9d.php:2, Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function frontImage() on null at /var/www/peralta/storage/framework/views/e87d8c383716cff1e61362d338b1bf6cf4fdeb9d.php:2)

I'm not sure to understand what's going on, maybe you'll be able to decrypt this.

A2. Yeah I'm using STB for testing purposes, I'll obviously switch to XMR & BTC once everything's working well.

Here is the line from the logs. [2022-11-15 18:25:43] local.ERROR: Purchase 6a292840-6448-11ed-ab7c-e9235ed90e83 :User test123 doesn't have a valid address for sending funds! If this is user w ho referred you please notify him!

Reading this I think that since money is on hold by the escrow system, once I (customer) click the button "mark as delivered", the escrow system can't release funds since the vendor address to receive funds isn't valid. Can you confirm?

And alright noted.

Gralien commented 1 year ago

so...the STB address does not exist...or its not a valid address. Seems the script is functioning and you need to look there. Id recommend you just go for an XMR local node on testnet

https://laravel-guide.readthedocs.io/en/latest/application-testing/ Im not sure about the blade error. Check if exist at all and then groups and permissions.

Ill check my notes and get back.

dclipca commented 1 year ago

@desoasl44 I am closing this issue due to inactivity. Please add a comment if the issue still persists.

Tarun-developer commented 1 year ago

It seems that there is an error occurring in the Laravel Blade template file "card.blade.php" when calling the frontImage() method on a null object. Let's break down the error message and understand what might be causing this issue.

Error Message:

Call to a member function frontImage() on null (View: /var/www/peralta/resources/views/includes/product/card.blade.php)

This error message indicates that the frontImage() method is being called on a null object in the Blade view file "card.blade.php".

Probable Cause: The error suggests that there is a variable or object expected to be available in the Blade view, but it is not being passed or initialized properly. This results in the variable being null when the frontImage() method is called on it.

Possible Solution: To fix this issue, you should check the source of the data that is supposed to be passed to the "card.blade.php" view and ensure it is correctly initialized and passed to the view. Here are some steps to follow:

  1. Identify the View: Locate the "card.blade.php" view file mentioned in the error message: "/var/www/peralta/resources/views/includes/product/card.blade.php".

  2. Check Data Passing: Look for the controller or other code responsible for rendering the view. Ensure that it is passing the necessary data to the view, including the object that has the frontImage() method.

  3. Verify Data Availability: Check if the data object that is supposed to have the frontImage() method is properly initialized and contains valid data. If it is null, this could be the cause of the error.

  4. Use Conditional Checks: To handle cases where the data object might be null, you can use conditional checks in the Blade template to avoid calling the frontImage() method when the object is null. For example:

    @if ($dataObject)
    <img src="{{ $dataObject->frontImage() }}" alt="Front Image">
    @endif
  5. Debugging: If the issue persists, use debugging techniques such as dd() or var_dump() to inspect the data being passed to the view and identify any issues.

By following these steps, you should be able to identify the source of the error and fix the "Call to a member function frontImage() on null" issue in your Laravel application. Remember to ensure that the necessary data is properly passed to the view and that it is not null before calling any methods on it.