Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SiteLog 8.0.1 not working with DNN 9.1.0 #20

Open
digitalsigi opened this issue Feb 10, 2019 · 2 comments
Open

SiteLog 8.0.1 not working with DNN 9.1.0 #20

digitalsigi opened this issue Feb 10, 2019 · 2 comments

Comments

@digitalsigi
Copy link

Describe the bug

I'm running DNN 9.1.0 and installed SiteLog. I didn't even show up in any menu.
Astonishing after logout/login SiteLog Entry found in Admin Menu. Clicked on it, was kicked out, had to login again, menu entry was no longer there. Even more SiteLog entry was not found in list of Extensions.

There are no entries in the Logs.

Software Versions

  • DNN: 09.01.00
  • Module: 08.00.01

To Reproduce

Steps to reproduce the behavior:

  1. Install DNN 9.1.0
  2. Install SiteLog 8.0.1
  3. Look through menus
  4. See error -> no SiteLog

Expected behavior

OK, SiteLog should work.

@WillStrohl
Copy link
Member

The module not appearing right away is expected because the persona bar doesn't know to reload the menu options. All that should be required for anything added into the persona bar after installation is to refresh the page.

It won't work by default on a clean instance of 8.xx and newer because the settings aren't in place to enable it and they won't be there until you add them. There also isn't a UI to add them any longer. You'll have to add them manually using a query like the example below.

In short, the current iteration of this module simply was migrated from a previous version of DNN, and it assumes that you already had the necessary settings in place.

If running in SSMS:

IF NOT EXISTS (SELECT 1 FROM [dbo].[HostSettings] WHERE [SettingName] = N'SiteLogBuffer')
BEGIN
	INSERT INTO [dbo].[HostSettings] ([SettingName], [SettingValue], [SettingIsSecure], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate]) 
	VALUES (N'SiteLogBuffer', N'1', 0, -1, GETDATE(), -1, GETDATE());
END

IF NOT EXISTS (SELECT 1 FROM [dbo].[HostSettings] WHERE [SettingName] = N'SiteLogHistory')
BEGIN
	-- update the number of days to be any number you desire
	INSERT INTO [dbo].[HostSettings] ([SettingName], [SettingValue], [SettingIsSecure], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate]) 
	VALUES (N'SiteLogHistory', N'60', 0, -1, GETDATE(), -1, GETDATE());
END

-- run this query for each portal in your installation you wish to support, changing the PortalID to match, as required
IF NOT EXISTS (SELECT 1 FROM [dbo].[PortalSettings] WHERE [SettingName] = N'SiteLogHistory')
BEGIN
	-- update the number of days to be any number you desire
	INSERT INSERT INTO [dbo].[PortalSettings] ([PortalId], [SettingName], [SettingValue], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate]) 
	VALUES (0, N'SiteLogHistory', N'60', -1, GETDATE(), -1, GETDATE());
END

IF NOT EXISTS (SELECT 1 FROM [dbo].[HostSettings] WHERE [SettingName] = N'SiteLogStorage')
BEGIN
	INSERT INTO [dbo].[HostSettings] ([SettingName], [SettingValue], [SettingIsSecure], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate]) 
	VALUES (N'SiteLogStorage', N'D', 0, -1, GETDATE(), -1, GETDATE());
END

If running in DNN's SQL console:

IF NOT EXISTS (SELECT 1 FROM {databaseOwner}[{objectQualifier}HostSettings] WHERE [SettingName] = N'SiteLogBuffer')
BEGIN
	INSERT INTO {databaseOwner}[{objectQualifier}HostSettings] ([SettingName], [SettingValue], [SettingIsSecure], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate]) 
	VALUES (N'SiteLogBuffer', N'1', 0, -1, GETDATE(), -1, GETDATE());
END

IF NOT EXISTS (SELECT 1 FROM {databaseOwner}[{objectQualifier}HostSettings] WHERE [SettingName] = N'SiteLogHistory')
BEGIN
	-- update the number of days to be any number you desire
	INSERT INTO {databaseOwner}[{objectQualifier}HostSettings] ([SettingName], [SettingValue], [SettingIsSecure], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate]) 
	VALUES (N'SiteLogHistory', N'60', 0, -1, GETDATE(), -1, GETDATE());
END

-- run this query for each portal in your installation you wish to support, changing the PortalID to match, as required
IF NOT EXISTS (SELECT 1 FROM {databaseOwner}[{objectQualifier}PortalSettings] WHERE [SettingName] = N'SiteLogHistory')
BEGIN
	-- update the number of days to be any number you desire
	INSERT INSERT INTO {databaseOwner}[{objectQualifier}PortalSettings] ([PortalId], [SettingName], [SettingValue], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate]) 
	VALUES (0, N'SiteLogHistory', N'60', -1, GETDATE(), -1, GETDATE());
END

IF NOT EXISTS (SELECT 1 FROM {databaseOwner}[{objectQualifier}HostSettings] WHERE [SettingName] = N'SiteLogStorage')
BEGIN
	INSERT INTO {databaseOwner}[{objectQualifier}HostSettings] ([SettingName], [SettingValue], [SettingIsSecure], [CreatedByUserID], [CreatedOnDate], [LastModifiedByUserID], [LastModifiedOnDate]) 
	VALUES (N'SiteLogStorage', N'D', 0, -1, GETDATE(), -1, GETDATE());
END

@WillStrohl
Copy link
Member

WillStrohl commented Aug 9, 2019

Oh, and a point of clarification on the previous comment...

SiteLogHistory in the HostSettings table is simply used by some internal DNN logic when creating a new website (portal) as a default value.

Once the PortalSettings table has any value above 0 for the SiteLogHistory setting, then SiteLog is enabled for that website and that website only (if there is more than one website in that instance of DNN).

I just tested all of this in DNN Platform 09.03.02.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants