Search code examples
shopware

Error after Shopware update from 6.2.2 to 6.2.3


I have a monorepo with shopware/development, shopware/platform and custom/plugins in it. Application works on Docker and shows current version as v9999999 Developer Version. Demo data as products, properties and categories were deleted and new set was imported.

I was trying to update shopware/platform. My steps:

  1. Download code form https://github.com/shopware/platform/releases/tag/v6.2.3
  2. Copy it to 'platform' folder
  3. Run commands in container muenkel_app_server_1
composer install
bin/console database:migrate --all
bin/console theme:refresh
bin/console cache:clear

Front shows

Notice: Undefined index: structs
in platform/src/Core/Framework/DataAbstractionLayer/FieldSerializer/ListingPriceFieldSerializer.php (line 30)
     
      return new ListingPriceCollection();        
    }  
       
    $value = json_decode((string) $value, true);  
      
    return new ListingPriceCollection(unserialize($value['structs']));    
  }
}

Backend doesn't load product list

38 b67864 POST xhr 500 http://muenkel.local.de/api/v2/search/product

What did I miss in update process?


Solution

  • I haven't figured out what the cause is yet, but a temporary workaround is to add this on line 30 in ListingPriceFieldSerializer.php;

    if (!isset($value['structs'])) {
        $value['structs'] = 'a:0:{}';
    }
    

    Update; it is fixed in version 6.3.0.0, see commit here; https://github.com/shopware/platform/commit/20a4e656d9dcf54ff2180d1e28baac1495b30173