diff --git a/Src/Sxc.Tests/ToSic.Sxc.Tests/PageProperty/UpdatePropertyTest.cs b/Src/Sxc.Tests/ToSic.Sxc.Tests/PageProperty/UpdatePropertyTest.cs
index bb82a0bd8..7151a13cd 100644
--- a/Src/Sxc.Tests/ToSic.Sxc.Tests/PageProperty/UpdatePropertyTest.cs
+++ b/Src/Sxc.Tests/ToSic.Sxc.Tests/PageProperty/UpdatePropertyTest.cs
@@ -1,7 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
-using ToSic.Sxc.Web;
using ToSic.Sxc.Web.Internal.PageService;
-using ToSic.Sxc.Web.PageService;
namespace ToSic.Sxc.Tests.PageProperty
{
diff --git a/Src/Sxc/ToSic.Sxc/Startup/RegisterSxcObsolete.cs b/Src/Sxc/ToSic.Sxc/Startup/RegisterSxcObsolete.cs
index 65fdbe21a..f9d39d3a7 100644
--- a/Src/Sxc/ToSic.Sxc/Startup/RegisterSxcObsolete.cs
+++ b/Src/Sxc/ToSic.Sxc/Startup/RegisterSxcObsolete.cs
@@ -1,6 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
-using ToSic.Sxc.Web.PageService;
+using ToSic.Sxc.Web;
+
#pragma warning disable CS0618
#pragma warning disable CS0612
diff --git a/Src/Sxc/ToSic.Sxc/Web/Internal/ContentSecurityPolicy/ContentSecurityPolicyService.cs b/Src/Sxc/ToSic.Sxc/Web/Internal/ContentSecurityPolicy/ContentSecurityPolicyService.cs
index e0de61c96..96e666c1f 100644
--- a/Src/Sxc/ToSic.Sxc/Web/Internal/ContentSecurityPolicy/ContentSecurityPolicyService.cs
+++ b/Src/Sxc/ToSic.Sxc/Web/Internal/ContentSecurityPolicy/ContentSecurityPolicyService.cs
@@ -1,7 +1,6 @@
using ToSic.Sxc.Services;
using ToSic.Sxc.Services.Internal;
using ToSic.Sxc.Web.Internal.PageService;
-using ToSic.Sxc.Web.PageService;
namespace ToSic.Sxc.Web.Internal.ContentSecurityPolicy;
diff --git a/Src/Sxc/ToSic.Sxc/Web/Old/WebPageServiceObsolete.cs b/Src/Sxc/ToSic.Sxc/Web/Old/WebPageServiceObsolete.cs
index be508de6a..231f3ec5b 100644
--- a/Src/Sxc/ToSic.Sxc/Web/Old/WebPageServiceObsolete.cs
+++ b/Src/Sxc/ToSic.Sxc/Web/Old/WebPageServiceObsolete.cs
@@ -1,10 +1,27 @@
using ToSic.Razor.Blade;
+using ToSic.Sxc.Code.Internal;
-namespace ToSic.Sxc.Web.PageService;
+namespace ToSic.Sxc.Web;
+///
+/// This is the obsolete version of the PageService, which is needed to keep old Apps working which used this.
+/// The apps will get it using `var page = GetService{ToSic.Sxc.Web.IPageService}()` or similar.
+///
+///
[Obsolete]
-internal class WebPageServiceObsolete(Services.IPageService pageServiceImplementation) : ToSic.Sxc.Web.IPageService
+internal class WebPageServiceObsolete(Services.IPageService pageServiceImplementation) : IPageService, INeedsCodeApiService
{
+ ///
+ /// Forward execution context to the actual implementation.
+ ///
+ /// Fixes bug https://github.com/2sic/2sxc/issues/3424
+ ///
+ ///
+ public void ConnectToRoot(ICodeApiService codeRoot)
+ {
+ (pageServiceImplementation as INeedsCodeApiService)?.ConnectToRoot(codeRoot);
+ }
+
public string SetBase(string url = null)
{
return pageServiceImplementation.SetBase(url);
@@ -77,4 +94,5 @@ public string Activate(params string[] keys)
{
return pageServiceImplementation.Activate(keys);
}
+
}
\ No newline at end of file