Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Gibe.Umbraco.Blog.Tests/Gibe.Umbraco.Blog.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
<DefineConstants>NET6</DefineConstants>
<PropertyGroup>
<DefineConstants>NET10</DefineConstants>
</PropertyGroup>
Comment on lines +8 to 10
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this constant at all any more?


<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Umbraco.Cms.Web.Website" Version="10.0.1" />
<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.Website" Version="13.13.0" />
</ItemGroup>

<ItemGroup>
Expand Down
42 changes: 0 additions & 42 deletions Gibe.Umbraco.Blog.sln

This file was deleted.

15 changes: 15 additions & 0 deletions Gibe.Umbraco.Blog.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Solution>
<Configurations>
<BuildType Name="Admin" />
<BuildType Name="Debug" />
<BuildType Name="Release" />
</Configurations>
<Folder Name="/Solution Items/">
<File Path="Readme.md" />
<File Path="VERSION.txt" />
</Folder>
<Project Path="Gibe.Umbraco.Blog.Tests/Gibe.Umbraco.Blog.Tests.csproj">
<BuildType Solution="Admin|*" Project="Release" />
</Project>
<Project Path="Gibe.Umbraco.Blog/Gibe.Umbraco.Blog.csproj" />
</Solution>
16 changes: 8 additions & 8 deletions Gibe.Umbraco.Blog/Gibe.Umbraco.Blog.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<PackageId>Gibe.Umbraco.V10.Blog</PackageId>
<PackageVersion>10.0.0</PackageVersion>
<PackageId>Gibe.Umbraco.V13.Blog</PackageId>
<PackageVersion>13.0.0</PackageVersion>
Comment on lines +4 to +8
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: technically, v13 is net8...though I suppose it should be able to run in a net10 runtime, but you'd have to make sure you updated the net version to 10 - if we use this in the content store we should validate that?

<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageTags>Gibe Umbraco Blog</PackageTags>
<Authors>Gibe Digital Ltd</Authors>
<Version>10.0.0</Version>
<Version>13.0.0</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
<DefineConstants>NET6,NET6</DefineConstants>
<PropertyGroup>
<DefineConstants>NET10,NET10</DefineConstants>
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The define constant "NET10" is duplicated. The DefineConstants property should be "NET10" (or the correct .NET version identifier once the framework version is corrected), not "NET10,NET10".

Suggested change
<DefineConstants>NET10,NET10</DefineConstants>
<DefineConstants>NET10</DefineConstants>

Copilot uses AI. Check for mistakes.
</PropertyGroup>
Comment on lines +15 to 17
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need the constants now we're not dual targetting?


<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Umbraco.Cms.Web.Website" Version="10.0.1" />
<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.Website" Version="13.13.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 1 addition & 5 deletions Gibe.Umbraco.Blog/Models/BlogAuthor.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#if NET6
using Umbraco.Cms.Core.Models.Membership;
#elif NET472
using Umbraco.Core.Models.Membership;
#endif
using Umbraco.Cms.Core.Models.Membership;

namespace Gibe.Umbraco.Blog.Models
{
Expand Down
10 changes: 0 additions & 10 deletions Gibe.Umbraco.Blog/Models/BlogPostBase.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
#if NET6
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Extensions;
#elif NET472
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Web;
#endif


namespace Gibe.Umbraco.Blog.Models
{
public abstract class BlogPostBase : PublishedContentModel, IBlogPostModel
{
#if NET6
protected BlogPostBase(IPublishedContent content, IPublishedValueFallback publishedValueFallback)
: base(content, publishedValueFallback) { }
#elif NET472
protected BlogPostBase(IPublishedContent content)
: base(content) { }
#endif

public DateTime PostDate => this.Value<DateTime>("postDate");

Expand Down
14 changes: 14 additions & 0 deletions Gibe.Umbraco.Blog/Models/BlogSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Gibe.Umbraco.Blog.Models
{
public class BlogSettings : IBlogSettings
{
public string IndexName { get; set; } = "ExternalIndex";

public string BlogPostDocumentTypeAlias { get; set; } = "blogPost";
public string BlogSectionDocumentTypeAlias { get; set; } = "blogSection";

public string UserPickerPropertyEditorAlias { get; set; } = "Umbraco.UserPicker";

public string UserPickerName { get; set; } = "User Picker - All Users";
}
}
39 changes: 0 additions & 39 deletions Gibe.Umbraco.Blog/Models/HardCodedBlogSettings.cs

This file was deleted.

4 changes: 0 additions & 4 deletions Gibe.Umbraco.Blog/Models/IBlogPostModel.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
#if NET6
using Umbraco.Cms.Core.Models.PublishedContent;
#elif NET472
using Umbraco.Core.Models.PublishedContent;
#endif

namespace Gibe.Umbraco.Blog.Models
{
Expand Down
9 changes: 1 addition & 8 deletions Gibe.Umbraco.Blog/Repositories/BlogContentRepository.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#if NET6
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Web;
#elif NET472
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Web;
#endif



namespace Gibe.Umbraco.Blog.Repositories
{
Expand Down
6 changes: 1 addition & 5 deletions Gibe.Umbraco.Blog/Repositories/IBlogContentRepository.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#if NET6
using Umbraco.Cms.Core.Models.PublishedContent;
#elif NET472
using Umbraco.Core.Models.PublishedContent;
#endif
using Umbraco.Cms.Core.Models.PublishedContent;

namespace Gibe.Umbraco.Blog.Repositories
{
Expand Down
6 changes: 4 additions & 2 deletions Gibe.Umbraco.Blog/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Logging.Viewer;
using Umbraco.Extensions;

namespace Gibe.Umbraco.Blog
Expand All @@ -21,9 +20,12 @@ public static class NetCoreServicesExtensions
{
public static void AddGibeBlog<T>(this IServiceCollection services) where T : class, IBlogPostModel
{
services.AddOptions<BlogSettings>()
.BindConfiguration("Gibe:Umbraco:Blog")
.ValidateOnStart();
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The service registration is missing for IBlogSettings. While BlogSettings is configured using the options pattern (lines 23-25), there is no registration that binds IBlogSettings to BlogSettings for dependency injection. Classes like BlogSearch, NewsIndex, IndexEventsComponent, and BlogSections inject IBlogSettings directly, not IOptions<BlogSettings>. You need to add a service registration such as: services.AddSingleton<IBlogSettings>(sp => sp.GetRequiredService<IOptions<BlogSettings>>().Value) or modify all consuming classes to inject IOptions<BlogSettings> instead.

Suggested change
.ValidateOnStart();
.ValidateOnStart();
services.AddSingleton<IBlogSettings>(sp => sp.GetRequiredService<IOptions<BlogSettings>>().Value);

Copilot uses AI. Check for mistakes.

services.AddGibePager<CurrentUrlService>();
services.AddTransient<IPagerService, PagerService>();
services.AddTransient<IBlogSettings, HardCodedBlogSettings>();
services.AddTransient<IBlogService<T>, BlogService<T>>();
services.AddTransient<IUnpagedBlogService<T>, UnpagedBlogService<T>>();
services.AddTransient<IBlogPostMapper<T>, BlogPostMapper<T>>();
Expand Down
2 changes: 1 addition & 1 deletion Gibe.Umbraco.Blog/Wrappers/ISearchIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public FakeSearchIndex(ISearchResults searchResults,
public IQuery CreateSearchQuery()
{
return GetIndex()
.GetSearcher()
.Searcher
.CreateQuery();
}

Expand Down
2 changes: 1 addition & 1 deletion Gibe.Umbraco.Blog/Wrappers/NewsIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public NewsIndex(IExamineManager examineManager,
public IQuery CreateSearchQuery()
{
return GetIndex()
.GetSearcher()
.Searcher
.CreateQuery();
}

Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.0
13.0.0
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a discrepancy between the PR title and the code changes. The PR title states "Migrate Gibe.Umbraco.Blog to .NET 10" but the version number changes (from 10.0.0 to 13.0.0) and package references (Umbraco.Cms.Web.Website Version="13.13.0") suggest this is actually a migration to Umbraco 13, not .NET 10. Additionally, .NET 10 does not exist yet. This appears to be confusion between Umbraco version numbers and .NET version numbers. Please clarify the actual intent of this migration.

Copilot uses AI. Check for mistakes.
Loading