Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

SiteDefinition.Current.SiteUrl returns null in AfterInstall()

$
0
0

We are trying to acces `SiteDefinition.Current` at the time of `AfterInstall`. What we need is `SiteUrl` and `Id` but it seems that at the time of this event they are not available.

How can we postpone the calling of `AfterInstall` or otherwise, could we attach an event listener in `AfterInstall` that can later in the pipeline provide us the data?

Update:

From what I can see in the documentation and from here (enumerating the order of the execution of dependencies), decorating the class like the following should have EPiServer.Web initialized, and  by extent, SiteDefinition.Current.

[InitializableModule]
[ModuleDependency(typeof(Web.InitializationModule))]
public class ModulePackageInitializer : PackageInitializer

Decorated the class like bellow with no results.

[InitializableModule]
[ModuleDependency(typeof(EPiServer.Packaging.PackageInitializer))]
public class ModulePackageInitializer : PackageInitializer

Viewing all articles
Browse latest Browse all 9076

Trending Articles