Skip to main content

Posts

Personalisation Groups for Umbraco 14

Nearly a year ago now, I started a series of blog posts looking to migrate a package to Umbraco 14. In hindsight, that was a little premature... both in terms of stability (platform) and ability (my skills with modern front-end). So whilst I made some progress, it was slow going and led to a few occasions of getting stuck. Then the day job called, and priority needed to be getting Umbraco's commercial products ready for Umbraco 14, for which we are almost there. I took a recent "cycle hack" at work to see if I could go back to the personal package, and, based on what I've learnt, get that released for Umbraco 14. Which I've now done. You can find the release candidate for the "Personalisation Groups" package here on NuGet . Am pleased to say it was a lot quicker and easier to make progress coming back to it now. Whilst the package isn't particularly complicated compared to some others in the Umbraco community, it's probably at a useful s
Recent posts

Codegarden Talk - Building Packages with Umbraco 14

I'm talking at Umbraco's Codegarden this year, sharing some of what I've learnt in migrating our commercial products to Umbraco 14. As I'll mention in the talk, there are a few code samples that I'll probably have to go over a bit quickly, so if anyone is interested in viewing them with a bit more time, or using them for reference, I'll share them here. The slides are available here . And if you want to read what I hopefully managed to say... please see the speaker notes. The talk was recorded, so should be available at some point to on the Umbraco Events app as well as the Umbraco YouTube channel .

Verifying Mock Parameters

Found a use case for a feature of the .NET mocking framework Moq that may not be that well known, and was new to me at least. I had a method under test that - via a number of overloaded extension methods - called an underlying method in the Umbraco CMS. The details aren't really important, but specifically it was the method GetImageUrl on IImageUrlGenerator that I was mocking to return a known output. I was then testing how my method used that result it in it's processing. I could see the method failing when I had a setup like this: But passed with this: So clearly we weren't passing in the Height parameter that I was expecting. One way to solve this would be to get the Umbraco code locally and step into it, but I found another way that I read about on this closed issue for the Moq library. It provides a means of capturing the parameters passed to a mocked method, and then establishing what they are via a breakpoint or logging. That revealed that so

Upgrading Terraform Resources

One of the projects I currently work on consists of a few components - an API, a worker process, a couple of web applications and a serverless functions app - all of which are deployed to Azure using infrastrure as code defined as Terraform resources . We have recently been upgrading it from .NET 6 to .NET 8 and hit an issue when we tried to update the framework definition of the Azure app service resources defined in Terraform. The attribute in question only accepted up to .NET 6. The reason is that the resource we were using - azurerm_app_service - is now deprecated and replaced with azurerm_windows_web_app (or azurerm_linux_web_app ). It was a similar case for the app service plan ( azurerm_app_service_plan replaced with azurerm_service_plan ) and the functions app ( azurerm_function_app replaced with azurerm_windows_function_app ). Naively, my first thought was to just update our infrastructure configuration to use the newer resources, and deploy that update. However, don

Adding and Deleting Criteria

This is one of a series of posts looking at migrating Umbraco packages to Umbraco 14 and the new backoffice. Other posts in this series: Introduction Upgrading to Umbraco 14 Preview Creating a Property Editor With Umbraco 14 Adding and Deleting Criteria As of last time I posted in this series, I had a partially working property editor for Personalisation Groups. It could display the information stored against the property, and I'd solved a couple of challenges around retrieving external data and injecting scripts dynaically at runtime. There's not been too much progress since, but I've picked up a few more things along the way that I'll include as a bit of a "grab-bag" in this post. First step to make the data editable was wiring up some button clicks. In angularjs we are used to: <button type="button" ng-click="delete($index)">Delete</button> With Lit, the syntax is: <button type="b