Skip to content

Commit

Permalink
Fix the Search module's hidden dependency on Contents (#17479)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Feb 12, 2025
1 parent 444852a commit 49aa9ef
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/OrchardCore.Modules/OrchardCore.Search/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ public override void ConfigureServices(IServiceCollection services)
services.AddNavigationProvider<AdminMenu>();
services.AddPermissionProvider<Permissions>();
services.AddSiteDisplayDriver<SearchSettingsDisplayDriver>();

services.AddContentPart<SearchFormPart>()
.UseDisplayDriver<SearchFormPartDisplayDriver>();

services.AddDataMigration<SearchMigrations>();
}

public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
Expand All @@ -50,6 +45,19 @@ public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder ro
}
}

[RequireFeatures("OrchardCore.Contents")]
public sealed class ContentsStartup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddDataMigration<SearchMigrations>();

services
.AddContentPart<SearchFormPart>()
.UseDisplayDriver<SearchFormPartDisplayDriver>();
}
}

[RequireFeatures("OrchardCore.Deployment")]
public sealed class DeploymentStartup : StartupBase
{
Expand Down

0 comments on commit 49aa9ef

Please sign in to comment.