Why is my shared master module not published on all pages?


A shared module will not be published to all pages after it is displayed on all pages. This is when a master module's changes are not reflected in the other pages in the portal.



  • Access to SQL Server Database.



You can verify this by entering edit mode on a few pages and seeing the module, but they do not show on the live page.

The following are tables that affect whether a page is entirely published or not:

  • Tabs - IsPublished Column.
  • TabVersions - IsPublished Column.
  • ContentItems - StateID: Please note that in the content items table all of the modules on a page are listed; nevertheless, the only content item that has a StateID tied to it is the Content item of TypeID = 1 which is a page. The StateID would be the workflow State ID for the current workflow on your site. You can review these states on the ContentWorkflowStates.
  • HtmlText - isPublished: This is the state for HTML modules. This does not suggest that the workflow is managed on the module; however, once the page is published, all htmltext modules on the page are marked as published for version 9 onwards.



NOTE: This script will not work for pages that have never been published before. If you encounter errors while running the script, make sure all the pages in the specific portal have been published.

SQL script that you can run on SQL Server Database that will republish a module on all pages if set to show on all pages.

  1. Please backup your database first in case any problem arises, and if possible try it on staging first and on maintenance window as well.
  2. Download the attached DisplayOnAllPages.sql script. Open it on SQL Management Studio or similar, and modify the three variables that appear on the top. Those are:
    DECLARE @MasterModuleId INT = 111 --> change to your module id to be copied on every page
    DECLARE @MasterTabId INT = 222--> change to your source page tabid, in this case, the first page where you are creating and editing your module
    DECLARE @PortalId INT = 333 --> current portal id (if you host several sites on same server and database, be careful to select correct one)
    • You can find the MasterTabId by running SELECT * FROM Tabs WHERE TabName = '' in the SQL Console.
    • You can find the MasterModuleId by entering Edit Mode > Hover over the gear icon for the module's settings > in the bottom left of the browser, you should see the URL j('http://941engage.dnndev.me/LeeTony/ctl/Module/ModuleId/583)
    • You can find the PortalId by running SELECT * FROM PortalAlias in the SQL Console.
  3. After you double-check all three variables are correct. Run the script.



The shared module will successfully publish to all pages in the portal. You can verify if everything worked by accessing multiple pages on the environment throughout the site to see if the shared module has been published and the changes have persisted.





Article is closed for comments.