Developer forum

Forum » Swift » Missing nullcheck in EcommerceBadge.cshtml after Swift v.1.15

Missing nullcheck in EcommerceBadge.cshtml after Swift v.1.15

Mikkel Hammer
Mikkel Hammer
Reply

Hi DW,

We're experience an issue with EcommerceBadge when upgrading past swift v1.15 on solutions where the product field Campaign doesn't already exist.
We've used the deployment tool with the Swift for target -> eCommerce -> EcomProducts_Schema. But it doesn't create the Campaign field.

There's a missing null check on the availableCampaignsObject on line 95/96 (there's a linebreak in the cast).
So I've moved an existing null check further up and moved the other logic inside the if statement in our version (I've added the new version as a txt aswell)

here's a look at the PR change:
(ignore DevOps weird placement of the last added curlybrace...)



Hope you can add it for the next versions, without it our product list looks like this :D



Best regards,
Mikkel Hammer


Replies

 
Stefan Winther Dynamicweb Employee
Stefan Winther
Reply

Hi Mikkel,

Great catch - we'll see to that it gets fixed asap :)

Br
/Stefan

 
Merethe Vrå Andersen Dynamicweb Employee
Merethe Vrå Andersen
Reply
This post has been marked as an answer

Hi,

Fix is now at Github.
BR,
Merethe

Votes for this answer: 1
 
Mikkel Hammer
Mikkel Hammer
Reply

Hi both,

Thanks for the fix and letting me know! :)

Best regards,
Mikkel Hammer

 

You must be logged in to post in the forum