Instant Search - Uncaught TypeError: data.DefaultPictureModel is undefined

14 days ago
#22248 Quote
  • 2
Hello, I'm facing some issues with the Instant search plugin installed on the Avenue Theme 4.60 (upgraded from a 4.30). The first and minor one is that when I try to search for a given word nothing is displayed in the search box and the error "Uncaught TypeError: data.DefaultPictureModel is undefined" pops up in console.
As a quick fix, I edited the template to manage a null value
<img src="${ data.DefaultPictureModel?.ImageUrl }" alt="${ data.Name }" title="${ data.Name }" style="border: none">
but it's far from a good solution because I would prefer to show the product image. Here's an extract of the JSON  response to the GET request:
      "Name": "Sneaker Low Prsx ",
      "ShortDescription": "CALZATURE",
      "FullDescription": "<div class=\"accordion-content\" data-role=\"content\">\r\n<p>Il concetto di vissuto come sinonimo di artigianalità trova nella PRSX la sua espressione massima, grazie alla particolare fasciatura della suola, volutamente imperfetta e per questo brevettata dal marchio. Il modello PRSX donna in suede e pelle laminati unisce un'attitudine casual ad una ricercatezza unica di materiali. La suola in gomma è arricchita da dettagli in tessuto effetto specchio.</p>\r\n</div>",
      "SeName": "sneakers-donna-sneakers-prsx-prld-low-pe2023-7172",
      "Sku": "6339001242167",
      "ProductType": 5,
      "MarkAsNew": true,
      "ProductPrice": {
        "OldPrice": "€340,00",
        "OldPriceValue": null,
        "Price": "€204,00",
        "PriceValue": 204.0,
        "BasePricePAngV": null,
        "BasePricePAngVValue": 204.0,
        "DisableBuyButton": false,
        "DisableWishlistButton": false,
        "DisableAddToCompareListButton": true,
        "AvailableForPreOrder": false,
        "PreOrderAvailabilityStartDateTimeUtc": null,
        "IsRental": false,
        "ForceRedirectionAfterAddingToCart": false,
        "DisplayTaxShippingInfo": false,
        "DiscountPercentage": "40%",
        "CustomProperties": {}
      "PictureModels": [
          "ImageUrl": "",
          "ThumbImageUrl": null,
          "FullSizeImageUrl": "",
          "Title": "Visualizza i dettagli per Sneaker Low Prsx ",
          "AlternateText": "MM01 METAL FUCSIA",
          "CustomProperties": {}
      "ProductSpecificationModel": {
        "Groups": [
            "Name": null,
            "Attributes": [
                "Name": "Stagione",
                "Values": [
                    "AttributeTypeId": 0,
                    "ValueRaw": "PE2023",
                    "ColorSquaresRgb": null,
                    "CustomProperties": {}
                "Id": 1,
                "CustomProperties": {}
            "Id": 0,
            "CustomProperties": {}
        "CustomProperties": {}
      "ReviewOverviewModel": {
        "ProductId": 7172,
        "RatingSum": 0,
        "TotalReviews": 0,
        "AllowCustomerReviews": false,
        "CanAddNewReview": true,
        "CustomProperties": {}
      "Manufacturers": null,
      "Brand": "PHILIPPE MODEL",
      "Id": 7172,
      "CustomProperties": {
        "Url": "/it/sneakers-donna-sneakers-prsx-prld-low-pe2023-7172"
. It seems that some pictures would be available. Please let me know how can I fix it.

#22259 Quote
  • Moderator
  • 1566
Thank you for reporting this!

It has been fixed and deployed so you can update the theme to get the fix.
Boyko Stanev