Projekt

Allgemein

Profil

GX-Bug #69483

Von Till Tepelmann vor mehr als 2 Jahren aktualisiert

Produktvarianten können nicht beim Update auf 4.5.1.0 importiert werden, wenn keine Bilder in den Attributen vorhanden sind 

 Das Problem ist bei manchen MySQL Versionen und Serverkonfigurationen die sehr streng sind, wird auf NOT NULL geprüft gepfüft und wenn dann gm_filename beim Import NULL ist, wird das Update abgebrochen. In der Tabellenstruktur wird expizit vorgegeben, dass die Spalte gm_filename nicht NULL sein darf. 

 Hier sollte in der Datei src/gambio_updater/updates/v4.5.1.0/product_variants_migration.php Zeile 201 folgendes angepasst werden: 

 ---------- 

 Product variants cannot be imported when updating to 4.5.1.0 if there are no images in the attributes 

 The problem is with some MySQL versions and server configurations that are very strict, NOT NULL checked and then if gm_filename is NULL on import, the update is aborted. In the table structure, it is explicitly specified that the column gm_filename must not be NULL. 

 Here in the file src/gambio_updater/updates/v4.5.1.0/product_variants_migration.php line 201 the following should be adjusted: 


 ``` php 
 $image                   = isset($values['display_image']) ? "'" 
                                                                                    . $this->real_escape_string($values['display_image']) 
                                                                                    . "'" : 'NULL'; 
 ``` 

 ``` php 
 $image                   = isset($values['display_image']) ? "'" 
                                                                                    . $this->real_escape_string($values['display_image']) 
                                                                                    . "'" : ''; 
 ``` 

Zurück