Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error when adding product to cart – Call to getUid() on null in ProductController (TYPO3 v13.4.15) #677

@chrcan

Description

@chrcan

Hello,
I'm working with TYPO3 v13.4.15 and using the extensions:

  • extcode/cart
  • extcode/cart-products

I followed the official tutorial to set everything up.
However, when I try to add a product to the cart, I encounter the following error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: Call to a member function getUid() on null Error thrown in file /var/www/html/vendor/extcode/cart-products/Classes/Controller/ProductController.php in line 327. Requested URL: https://website.ddev.site/produkte/detail.html?tx_cart_cart%5Baction%5D=add&tx_cart_cart%5Bcontroller%5D=Cart%5CProduct&cHash=31934542a2e732a8a848ed38907f060f

To make sure it's not project-specific, I tested the same setup in a different TYPO3 project — but the error still occurs in exactly the same way.

Steps to reproduce:

  1. Install TYPO3 v13.4.15
  2. Install and configure extcode/cart and extcode/cart-products using the tutorial
  3. Open the detail page of a product
  4. Try to add the product to the cart

Expected behavior:

The product should be added to the cart without errors.

Actual behavior:

A fatal error occurs when submitting the add-to-cart action. It seems like a null value is passed where an object is expected in ProductController.php on line 327.

Additional context:

Let me know if you need any further logs or configuration details.
Thanks in advance!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions