GX-Bug #67306
geschlossenWidget ProductList does not show products if there are no alternative texts for the images in the database
0%
Produktliste im StyleEdit wird nun auch angezeigt, wenn der Alternativtext für das Hauptartikelbild fehlt
Beschreibung
Widget ProduktListe zeigt keine Produkte an wenn für die Bilder keine Alternativtexte in der Datenbank exisiteren
Kann wie folgt reproduziert werden:
- Neuen Artikel anlegen
- in der Datenbank den Eintrag für die Alternativtexte löschen (UPDATE
products_description
SET gm_alt_text = NULL;) - StyleEdit4 öffnen
- Im Theme in einer ContentZone ein Widget "ProductListe" einfügen.
- Bei Artikelauswahl "Neue Artikel" auswählen
- Fehler StringType: Invalid argument value given (expected string got NULL): erscheint statt der Produkte
Widget ProductList does not show products if there are no alternative texts for the images in the database
Can be reproduced as follows:
- create a new article
- delete the entry for the alternative texts in the database (UPDATE 'products_description' SET gm_alt_text = NULL;)
- open StyleEdit4
- insert a "ProductList" widget in a ContentZone in the theme
- select "New articles" in the article selection
- error StringType: Invalid argument value given (expected string got NULL): appears instead of the products
#0 StringType->__construct() called at [/GXMainComponents/Services/Core/FeaturedProducts/Repositories/FeaturedProductReader.inc.php:335]
#1 FeaturedProductReader->getNewProducts(FeaturedProductSettings Object ([*limit] => 10,[*randomOrder] => ,[*customerGroupId] => 0,[*statusFsk18] => 1,[*languageCode] => DE)) called at [/GXMainComponents/Services/Core/FeaturedProducts/Repositories/FeaturedProductRepository.inc.php:82]
#2 FeaturedProductRepository->getNewProducts(FeaturedProductSettings Object ([*limit] => 10,[*randomOrder] => ,[*customerGroupId] => 0,[*statusFsk18] => 1,[*languageCode] => DE)) called at [/GXMainComponents/Services/Core/FeaturedProducts/Services/FeaturedProductReadService.inc.php:79]
#3 FeaturedProductReadService->getNewProducts(FeaturedProductSettings Object ([*limit] => 10,[*randomOrder] => ,[*customerGroupId] => 0,[*statusFsk18] => 1,[*languageCode] => DE)) called at [/GXModules/Gambio/Widgets/ProductList/Classes/ProductListWidgetOutputCommand.php:213]
#4 ProductListWidgetOutputCommand->productsByListType(new) called at [/GXModules/Gambio/Widgets/ProductList/Classes/ProductListWidgetOutputCommand.php:122]
#5 ProductListWidgetOutputCommand->execute() called at [/GXModules/Gambio/Widgets/ProductList/Classes/ProductlistWidget.php:131]
#6 ProductlistWidget->previewContent(Gambio\StyleEdit\Core\Language\Entities\Language Object ([*code] => de,[*id] => 2)) called at [/GXModules/Gambio/StyleEdit/Core/Components/Widget/WidgetController.php:121]
#7 Gambio\StyleEdit\Core\Components\Widget\WidgetController->post(Array ([0] => styleedit,[1] => widget,[2] => Malibu2020-06-24_09-43-52_preview,[3] => productlist), {"id":"productlist","title":"Produktliste","icon":{"name":"Product List","file":"GXModules/Gambio/Widgets/ProductList/icon.svg"},"author":{"name":"Gambio GmbH","email":"info@gambio.de","url":"https://www.gambio.de"},"helpUrl":"https://www.gambio.de/help","description":"Mit diesem Widget kannst du ganz einfach Produkt-Slider zu deinem Shop hinzufügen","cache":0,"displayConfig":"sidebar","fieldsets":[{"title":"Allgemein","options":[{"id":"id","default":"","type":"textbox","value":"productlist6x1egk0xh","label":"ID","attributes":{"placeholder":"HTML Element ID"}},{"id":"class","default":"","type":"textbox","value":"","label":"Klasse","attributes":{"placeholder":"HTML Element Klasse"}}]},{"title":"Darstellung","options":[{"id":"presentation","default":"slider","type":"selectbox","value":"slider","label":"Darstellung","options":[{"value":"slider","text":"Slider"},{"value":"list","text":"List"}]},{"id":"maxProducts","default":"10","type":"textbox","value":"10","label":"Max. angezeigte Artikel"},{"id":"random","default":false,"type":"checkbox","value":false,"label":"Artikel zufällig anzeigen"}]},{"title":"Produkt","options":[{"id":"productlist","type":"productlist","label":"Product","items":{"listType":{"id":"productlist-listType","default":"own-list","type":"selectbox","value":"new","label":"Artikelauswahl","attributes":{"placeholder":"Artikelauswahl"},"options":[{"value":"own-list","text":"Eigene Liste"},{"value":"category","text":"Kategorien"},{"value":"deals","text":"Angebote"},{"value":"recommended","text":"Empfohlene Artikel"},{"value":"coming-soon","text":"Erscheint bald"},{"value":"new","text":"Neu"}]},"products":{"id":"productlist-products","default":[],"type":"productsearchbox","value":[],"label":"Produkt wählen","attributes":{"placeholder":"Produkt-ID oder -namen suchen..."},"endpoint":"/admin/admin.php?do=StyleEditProductSearch/byTerm"},"category":{"id":"productlist-category","type":"categorysearchbox","label":"Kategorie auswählen","attributes":{"placeholder":"Kategorie-ID oder -namen suchen"},"endpoint":"/admin/admin.php?do=StyleEditCategorySearch/byTerm"}},"default":{"listType":"own-list","products":[],"category":null}}]}],"type":"productlist"}) called at [/GXModules/Gambio/StyleEdit/Api/Controllers/StyleEditController.php:206]
#8 Gambio\StyleEdit\Api\Controllers\StyleEditController->post() called at [/GXModules/Gambio/StyleEdit/Api/config/routes.php:27]
Zugehörige Tickets