Search code examples
dotnetnukedotnetnuke-5

HTML Module: Set Default Workflow for Site option missing in 5.6


I recently updated to DNN 5.6 and noticed that in my HTML module the option to set the workflow as the site default is missing.

Apparently this was removed in the lastest CE release of DNN (forum here).

Is this something I can set via SQL in the database?


Solution

  • It appears that the UI was accidentally removed from the CE version as part of the re-organization of the HTML module in 5.6.0.

    Here is the relevant code from HtmlTextController.UpdateWorkflow

    Case "Site"
      PortalController.UpdatePortalSetting(ObjectID, "WorkflowID", WorkflowID.ToString)
      If ReplaceExistingSettings Then
        'Get All Tabs aon the Site
        For Each kvp As KeyValuePair(Of Integer, TabInfo) In tabController.GetTabsByPortal(ObjectID)
          tabController.DeleteTabSetting(kvp.Value.TabID, "WorkFlowID")
        Next
        'Get All Modules in the current Site
        For Each objModule As ModuleInfo In moduleController.GetModules(ObjectID)
          ClearModuleSettings(objModule)
        Next
      End If
    

    Adding a WorkflowID portal setting is all that is needed to set the workflow for the whole portal, but it is important to ensure that all the tabs (pages) and HTML modules have their specific workflow settings cleared.

    Edit

    It turns out the controls are actually still there, but hidden by accident. To make them visible again do the following.

    • go to \DesktopModules\HTML
    • open the file "Settings.ascx"
    • Find <tr id="rowApplyTo" runat="server" visible="false">
    • change to <tr id="rowApplyTo" runat="server" visible="true">