Frage

I have a dnn 7.1.1 installation I am testing for production. I thought that this version supported a 404 error page. But no matter what type of erroneous url I pass to the DNN site I don't get this page appearing and I don't see it under admin/page management. DO I have to turn this feature on some where? This is a brand new install and the following page says it should be turned on by default: DNN 404 wiki I could not find any setting in the root web.config. The advanced url provider is enabled.

Can someone help me figure out how to timplement this 404 error page

Thanks in advance

EDIT 1:

Can someone confirm that 7.1.1 is the minimum version for this feature, or is it only with the professional version, I am using DNN platform.

EDIT 2:

See HERE for link to DNN issue tracker. I have tried this both with a new installation and an upgrade from 7.0.6 and the problem continues. If you ask for an non-existent resource with an extension you get a generic asp server error:

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /blob.aspx

if you request a page wihtout an extension like /blob you get one of two errors:

404 Not Found
The requested Url does not return any valid content.
Administrators
Change this message by configuring a specific 404 Error Page or Url for this website.

OR

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

There is no 404error page in the admin/page management section of the site in either the upgrade or brand new instal. The new instal was deployed uwing Azure website Gallery for DNN 7.1.1.

I manually upgraded a 7.0.6 instance to 7.1.1 to get the other testing environment.

EDIT 3:

Okay, so I know how to reproduce this. If you create a new portal/site with the blank template then there is no 404 error page under admin/page management. If you create a site with the default English template then the 404 error page is listed in page management and the 404 page shows up when you request a deadpage.

WHat I tried: I copied the 404 error page from the default template site into the blank template site hoping that this would fix the problem. It did not. So now I think that there is a setting that needs to be enabled somewhere, but I know it is not in the web.config file because both these portals are in the same dnn instance and one works and the other does not, so there is another place I have to find this.

EDIT 4:

I don't have a work around other than creating new site with default template and recreating a site. It appears that this error is planned to be fixed by 7.2.1 as documented HERE

EDIT 5:

I dug through the databse to see if I could find a setting that would make this work. The only setting I could find was in portal settings (called 'AUM_ErrorPage404'), so I duplicated it with the following script but changed the portal and tabID to match the portal that was created with the blank template .

This added a setting to portal settings that assigned a error page to the portal. I found this setting for the default template and not the blank template. SO I added it hoping it would solve my problem. It did not.

INSERT INTO [dbo].[PortalSettings](
       [PortalID]
      ,[SettingName]
      ,[SettingValue]
      ,[CreatedByUserID]
      ,[CreatedOnDate]
      ,[LastModifiedByUserID]
      ,[LastModifiedOnDate]
      ,[CultureCode])
  VALUES (
       [PortalID]
      ,'AUM_ErrorPage404'
      ,[TabID of 404 Page I Created]
      ,[CreatedByUserID]
      ,getdate()
      ,[CreatedByUserID]
      ,getdate()
      ,'en-us')

I found no settings for the 404error page/tab in the [TabSettings] for the page created in the default template, in fact, there were no records in tabSettings for the error page created in the default template portal..

A brand new site created with the default template in 7.1 only has the following portal settings (with values):

AUM_ErrorPage404    371
DefaultAdminContainer   [G]Containers/Gravity/Title_h2.ascx
DefaultAdminSkin            [G]Skins/Gravity/2-Col.ascx
DefaultPortalAlias          test404
DefaultPortalContainer  [G]Containers/Gravity/Title_h2.ascx
DefaultPortalSkin           [G]Skins/Gravity/2-Col.ascx
EnableSkinWidgets           True
GettingStartedPageShown True
GettingStartedTabId 346
MaximumVersionHistory   5
PortalAliasMapping          CANONICALURL
SearchAdminInitialization   true
TimeZone                            Pacific Standard Time

I am not sure where else to look in the DB for a setting to chnage

War es hilfreich?

Lösung 2

Okay, I got it to work!

The script above did the trick:

INSERT INTO [dbo].[PortalSettings](
       [PortalID]
      ,[SettingName]
      ,[SettingValue]
      ,[CreatedByUserID]
      ,[CreatedOnDate]
      ,[LastModifiedByUserID]
      ,[LastModifiedOnDate]
      ,[CultureCode])
  VALUES (
       [PortalID]
      ,'AUM_ErrorPage404'
      ,[TabID of 404 Page I Created]
      ,-1
      ,getdate()
      ,-1
      ,getdate()
      ,'en-us')

The missed step:

After adding the setting for AUM_ErrorPage404 I had to clear the cache and restart the application. Now it works.

Andere Tipps

After some research and hours of frustration. I found that a new setting is required in version 7.2.2:

The table: PortalLocalization now contain two fields: Custom404TabId and Custom500TabId, those fields need to be updated with the same value of the PortalSetting AUM_ErrorPage404, AUM_ErrorPage500 so if you upgrade from a version below to 7.1 probably you have to update those fields by yourself.

Hope this save time. Israel Garcia

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top