I've spotted what appears to be a bug in contour. If you insert the placeholder for a cookie into the email template as part of a workflow send email item, for example [%myCookie], and the cookie doesn't exist for some reason (say it hasn't been set, has expired, user has cookies off), then the site throws a null reference exception, as it's not checking if the cookie exists before it gets the value.
I've not tested it on the main site yet, so it may be the
umbraco.BusinessLogic.StateHelper.GetSessionValue
function that needs to check the cookie exists, or its one of the workflowservices methods.
It looks like its the GetSessionValue function (same issue for the GetCookieValue function).
Is this by design? I'd normally check that the session/cookie existed and return string.empty if its no there, precisely to avoid these kind of errors, as there's all sorts of reasons why a cookie might be missing.
Bug in Session/Cookie code
Hi,
I've spotted what appears to be a bug in contour. If you insert the placeholder for a cookie into the email template as part of a workflow send email item, for example [%myCookie], and the cookie doesn't exist for some reason (say it hasn't been set, has expired, user has cookies off), then the site throws a null reference exception, as it's not checking if the cookie exists before it gets the value.
I've not tested it on the main site yet, so it may be the
function that needs to check the cookie exists, or its one of the workflowservices methods.
It looks like its the GetSessionValue function (same issue for the GetCookieValue function).
Is this by design? I'd normally check that the session/cookie existed and return string.empty if its no there, precisely to avoid these kind of errors, as there's all sorts of reasons why a cookie might be missing.
is working on a reply...