colb@NVPhx
11/21/2024, 6:40 PMSystem.InvalidOperationException: Could not parse internal links, there is no current UmbracoContext
.
The Code:
Here’s the part where the error occurs:
m.Value<string>("docuSignTemplateId");
And here’s the full code snippet:
var ctx = HttpContext.Current;
string offeringId = ctx.Request["offeringId"];
IPublishedContent m = Umbraco.Content(offeringId);
var docuSignTemplateId = "";
docuSignTemplateId = m.Value<string>("docuSignTemplateId");
What I Think:
It seems like the UmbracoContext isn’t available at the point where this code runs, possibly because it’s being called outside of a valid HTTP request lifecycle.
Has anyone faced a similar issue or know the best way to handle this scenario? Any guidance on ensuring UmbracoContext is available or how to rewrite this code would be appreciated!
Thanks in advance! 🙌Ambert
11/21/2024, 7:58 PM