Projekt

Allgemein

Profil

Aktionen

GX-Bug #66227

geschlossen

Basket broken if GIFT-product is put into it / Warenkorb kaputt wenn Gutschein-Artikel hineingelegt wird

Von Ulrich Wenk vor etwa 4 Jahren hinzugefügt. Vor etwa 4 Jahren aktualisiert.

Status:
Erledigt
Priorität:
Dringend
Zugewiesen an:
Marvin Muxfeld
Kategorie:
Sonstiges
Zielversion:
% erledigt:

100%

Geschätzter Aufwand:
Steps to reproduce:
Betroffene Versionen:
Unbestimmt
Release Notes Langtext:

Warenkorb geht nicht mehr kaputt, wenn ein Gutschein-Artikel hineingelegt wird


Beschreibung

Preconditions:

  • create a gift product (create a product with Product Model GIFT_1234)

  • have malibu active (?)

  1. call this product in the frontend
  2. put this item into your basket and go to the basket

result:

  • instead of the basket a blank page gets displayed

  • Log attached below

```2020-03-06 12:23:22 ERROR: Uncaught TypeError: Argument 1 passed to Gambio\Shop\SellingUnit\Unit\ValueObjects\TaxInfo::__construct() must be of the type string, null given, called in /var/www/uw/4.0.0.0beta13_hub/GambioShop/Product/TaxInfo/Listener/OnGetSellingUnitTaxInfoEventListener.php on line 50 and defined in /var/www/uw/4.0.0.0beta13_hub/GambioShop/SellingUnit/Unit/ValueObjects/TaxInfo.php:38

context:

message:

Uncaught TypeError: Argument 1 passed to Gambio\Shop\SellingUnit\Unit\ValueObjects\TaxInfo::construct() must be of the type string, null given, called in /var/www/uw/4.0.0.0beta13_hub/GambioShop/Product/TaxInfo/Listener/OnGetSellingUnitTaxInfoEventListener.php on line 50 and defined in /var/www/uw/4.0.0.0beta13_hub/GambioShop/SellingUnit/Unit/ValueObjects/TaxInfo.php:38
Stack trace:
#0 /var/www/uw/4.0.0.0beta13_hub/GambioShop/Product/TaxInfo/Listener/OnGetSellingUnitTaxInfoEventListener.php(50): Gambio\Shop\SellingUnit\Unit\ValueObjects\TaxInfo->
construct(NULL, 0)
#1 /var/www/uw/4.0.0.0beta13_hub/GambioCore/Event/EventDispatcher.php(78): Gambio\Shop\Product\TaxInfo\Listener\OnGetSellingUnitTaxInfoEventListener->__invoke(Object(Gambio\Shop\SellingUnit\Database\Unit\Events\OnGetSellingUnitTaxInfoEvent))
#2 /var/www/uw/4.0.0.0beta13_hub/GambioShop/SellingUnit/Unit/SellingUnit.php(313): Gambio\Core\Event\EventDispatcher->dispatch(Object(Gambio\Shop\SellingUnit\Database\Unit\Events\OnGetSellingUnitTaxInfoEvent
code:

1
file:

/var/www/uw/4.0.0.0beta13_hub/GambioShop/SellingUnit/Unit/ValueObjects/TaxInfo.php
line:

38
context:

obCleanCache:

extra:

request:

method:
GET
uri:

/4.0.0.0beta13_hub/shopping_cart.php
software:

Apache/2.4.29 (Ubuntu)
address:

192.168.101.24
userAgent:

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0
time:

826
remoteAddress:

192.168.100.195
session:

tpl:

Malibu
language:

german
languages_id:

2
language_charset:

utf-8
language_code:

de
currency:

EUR
customers_status:

...
customer_id:

103
payment:

shipping:

cartID:
sendto:
3
billto:


  

Dateien

php_errors.log (1).txt (139 KB) php_errors.log (1).txt Ulrich Wenk, 06.03.2020 12:37

Aktionen #1

Von Ulrich Wenk vor etwa 4 Jahren aktualisiert

  • Thema wurde von Basket broken if GIFTZ-product is put into it / Warenkorb kaputt wenn Gutschein-Artikel hineingelegt wird zu Basket broken if GIFT-product is put into it / Warenkorb kaputt wenn Gutschein-Artikel hineingelegt wird geändert
Aktionen #2

Von Ulrich Wenk vor etwa 4 Jahren aktualisiert

  • Beziehung mit GX-Bug #66226: Gift Voucher Queue throws SQL error / Gutschein Queue wirft SQL error wurde hinzugefügt
Aktionen #3

Von Marco Bruchmann vor etwa 4 Jahren aktualisiert

Dieser Bug steht nicht mit #66226 oder überhaupt mit dem Gutscheinsystem in Beziehung. OnGetSellingUnitTaxInfoEventListener verwendet den Rückgabewert von main::getTaxInfo() als string ungeachtet der Tatsache, dass der Rückgabewert bei Steuersatz 0 durchaus null sein kann. Dass Artikel keinen zugeordneten Steuersatz haben, ist ein valider Anwendungsfall, der zufällig vor allem bei Gutscheinen auftritt.


This bug is not related to #66226 or, in fact, to the gift system. OnGetSellingUnitTaxInfoEventListener uses the value from main::getTaxInfo() as a string, but it can be null if the tax rate is 0. That’s a valid use case, esp. for things like gift vouchers which must not have a VAT class associated with them.

Aktionen #4

Von Marco Bruchmann vor etwa 4 Jahren aktualisiert

  • Beziehung mit GX-Bug #66226: Gift Voucher Queue throws SQL error / Gutschein Queue wirft SQL error wurde gelöscht
Aktionen #5

Von Julian Heckmann vor etwa 4 Jahren aktualisiert

  • Status wurde von Anerkannt zu In Bearbeitung geändert
  • Zugewiesen an wurde auf Julian Heckmann gesetzt
Aktionen #6

Von Julian Heckmann vor etwa 4 Jahren aktualisiert

  • Status wurde von In Bearbeitung zu Testing geändert
  • Zugewiesen an wurde von Julian Heckmann zu Core-Entwickler geändert
  • Zielversion wurde von 133 zu 4.1.1.0 beta3 geändert
  • Release Notes Langtext aktualisiert (Vergleich)
Aktionen #7

Von Marvin Muxfeld vor etwa 4 Jahren aktualisiert

  • Zugewiesen an wurde von Core-Entwickler zu Marvin Muxfeld geändert
Aktionen #8

Von Marvin Muxfeld vor etwa 4 Jahren aktualisiert

  • Status wurde von Testing zu Erledigt geändert
  • % erledigt wurde von 0 zu 100 geändert
Aktionen

Auch abrufbar als: Atom PDF