Hi everyone,
Globals.NavigateURL has been deprecated, but it's currently not possible to resolve a dependency on NavigationManager in a subclass of ModuleSearchBase. DependencyProvider does not exist in the context. Am I missing something or this is a feature that still needs to be implemented?
Kinds regards,
Derek
Is this issue resolved in version 9.13.9?
I am trying to understand what needs to be done here in order to "future-proof" this future breaking change ...
I've submitted a PR with an example of a way to resolve this particular scenario.
I would approach this by introducing a constructor which will be used in DNN 10 that has an <code>IPortalAliasService</code> parameter. For DNN 9, continue using a parameterless constructor and pass an <code>IPortalAliasService</code> instance to the new constructor. That part could look like this:
<code>private readonly IPortalAliasService portalAliasService; public TopicsController() : this(new DotNetNuke.Entities.Portals.PortalAliasController()) { } public TopicsController(IPortalAliasService portalAliasService) { this.portalAliasService = portalAliasService; } </code>
Posted By Brian Dukes on 1/12/2026 3:48 PM For DNN 9, continue using a parameterless constructor and pass an <code>IPortalAliasService</code> instance to the new constructor.
For DNN 9, continue using a parameterless constructor and pass an <code>IPortalAliasService</code> instance to the new constructor.
Thanks Brian...you rock!
Posted By Brian Dukes on 1/12/2026 3:48 PM I would approach this by introducing a constructor which will be used in DNN 10 that has an <code>IPortalAliasService</code> parameter.
I would approach this by introducing a constructor which will be used in DNN 10 that has an <code>IPortalAliasService</code> parameter.
Hi Brian. Wanted to see if you can help clarify this statement "... a constructor which will be used in DNN 10 ... ". The constructor here is "TopicsController", which implements ModuleSearchBase. Are you saying that DNN 10 will change the constructor instantiation for the controller that implements ModuleSearchBase to include IPortalAliasService? Or that it's the "businessControllerClass" for the module? Or that something else in DNN 10 that will affect any constructor that is called with a parameter of IPortalAliasService?
Starting in DNN 10, the business controller class supports constructor injection (<code>ModuleSearchBase</code> is a base class for the business controller class, in addition to the interfaces like <code>IUpgradeable</code> and <code>IPortable</code>). So, any constructor parameter in the class will be automatically provided by the Dependency Injection container (assuming it's registered with the container). Does that answer what you're asking?
Posted By Brian Dukes on 2/26/2026 9:40 AM Starting in DNN 10, the business controller class supports constructor injection (<code>ModuleSearchBase</code> is a base class for the business controller class, in addition to the interfaces like <code>IUpgradeable</code> and <code>IPortable</code>). So, any constructor parameter in the class will be automatically provided by the Dependency Injection container (assuming it's registered with the container). Does that answer what you're asking?
Perfect! Thanks for your answer.
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.