|
|
|
Joined: 12/21/2004
Posts: 30
|
|
|
David A-W wrote
On the Host > SQL page, try running the following:
UPDATE dbo.{objectQualifier}Tabs
SET IconFile = REPLACE(IconFile, '~/images/', '/images/')
, IconFileLarge = REPLACE(IconFileLarge, '~/images/', '/images/')
WHERE IconFile LIKE '~/images/%'
Then go to Host > Host Settings and click Restart Application.
To clarify: the above fixes an issue with 5.1 Admin and Host menu icons only - not custom page icons.
When I upgraded to 5.2, I then had to revert the above fix - however I noticed all my custom page icons were now broken for child (non-root) portals.
To fix this, I ran the below under Host > SQL as a script, then again restarted the application:
ALTER VIEW dbo.{objectQualifier}vw_Tabs
AS
SELECT
T.TabID,
T.TabOrder,
T.PortalID,
T.TabName,
T.IsVisible,
T.ParentId,
T.[Level],
CASE WHEN I.FileID IS NULL THEN T.IconFile
ELSE '~/' + P.HomeDirectory + '/' + I.Folder + I.FileName
END AS IconFile,
CASE WHEN L.FileID IS NULL THEN T.IconFileLarge
ELSE '~/' + P.HomeDirectory + '/' + L.Folder + L.FileName
END AS IconFileLarge,
T.DisableLink,
T.Title,
T.Description,
T.KeyWords,
T.IsDeleted,
T.SkinSrc,
T.ContainerSrc,
T.TabPath,
T.StartDate,
T.EndDate,
T.Url,
CASE WHEN EXISTS (SELECT 1 FROM dbo.Tabs T2 WHERE T2.ParentId = T.TabId) THEN 'true' ELSE 'false' END AS HasChildren,
T.RefreshInterval,
T.PageHeadText,
T.IsSecure,
T.PermanentRedirect,
T.SiteMapPriority,
T.CreatedByUserID,
T.CreatedOnDate,
T.LastModifiedByUserID,
T.LastModifiedOnDate
FROM dbo.{objectQualifier}Tabs AS T
LEFT JOIN dbo.{objectQualifier}Portals AS P ON P.PortalID = T.PortalID
LEFT JOIN dbo.{objectQualifier}Files AS I ON I.FileID = CASE WHEN LEFT(LOWER(T.IconFile), 7) = 'fileid=' THEN CAST((RIGHT(LOWER(T.IconFile), LEN(T.IconFile) - 7)) AS int) ELSE -1 END
LEFT JOIN dbo.{objectQualifier}Files AS L ON L.FileID = CASE WHEN LEFT(LOWER(T.IconFileLarge), 7) = 'fileid=' THEN CAST((RIGHT(LOWER(T.IconFileLarge), LEN(T.IconFileLarge) - 7)) AS int) ELSE -1 END
Hope that helps anyone else with a similar issue!
Reported in the bug tracker as issue 11228
|
|
|
|
| |
|
|
Joined: 12/21/2004
Posts: 30
|
|
|
This is still a problem for non-root portals in DNN 5.4.0
DNN 5.4 has a new view definition, so you'll need the updated script below:
ALTER VIEW {databaseOwner}{objectQualifier}vw_Tabs
AS
SELECT
T.TabID,
T.TabOrder,
T.PortalID,
T.TabName,
T.IsVisible,
T.ParentId,
T.[Level],
CASE WHEN I.FileID IS NULL THEN T.IconFile
ELSE '~/' + P.HomeDirectory + '/' + I.Folder + I.FileName
END AS IconFile,
CASE WHEN L.FileID IS NULL THEN T.IconFileLarge
ELSE '~/' + P.HomeDirectory + '/' + L.Folder + L.FileName
END AS IconFileLarge,
T.DisableLink,
T.Title,
T.Description,
T.KeyWords,
T.IsDeleted,
T.SkinSrc,
T.ContainerSrc,
T.TabPath,
T.StartDate,
T.EndDate,
T.Url,
CASE WHEN EXISTS (SELECT 1 FROM {databaseOwner}{objectQualifier}Tabs T2 WHERE T2.ParentId = T.TabId) THEN 'true' ELSE 'false' END AS HasChildren,
T.RefreshInterval,
T.PageHeadText,
T.IsSecure,
T.PermanentRedirect,
T.SiteMapPriority,
CI.ContentItemID,
CI.Content,
CI.ContentTypeID,
CI.ModuleID,
CI.ContentKey,
CI.Indexed,
T.CreatedByUserID,
T.CreatedOnDate,
T.LastModifiedByUserID,
T.LastModifiedOnDate
FROM {databaseOwner}{objectQualifier}Tabs AS T
LEFT OUTER JOIN {databaseOwner}{objectQualifier}ContentItems AS CI ON T.ContentItemID = CI.ContentItemID
LEFT JOIN {databaseOwner}{objectQualifier}Portals AS P ON P.PortalID = T.PortalID
LEFT JOIN {databaseOwner}{objectQualifier}Files AS I ON I.FileID = CASE WHEN LEFT(LOWER(T.IconFile), 7) = 'fileid=' THEN CAST((RIGHT(LOWER(T.IconFile), LEN(T.IconFile) - 7)) AS int) ELSE -1 END
LEFT JOIN {databaseOwner}{objectQualifier}Files AS L ON L.FileID = CASE WHEN LEFT(LOWER(T.IconFileLarge), 7) = 'fileid=' THEN CAST((RIGHT(LOWER(T.IconFileLarge), LEN(T.IconFileLarge) - 7)) AS int) ELSE -1 END
GO
|
|
|
|
| |
|
|
|
Joined: 4/29/2005
Posts: 27
|
|
|
David A-W wrote:
On the Host > SQL page, try running the following:
UPDATE dbo.{objectQualifier}Tabs
SET IconFile = REPLACE(IconFile, '~/images/', '/images/')
, IconFileLarge = REPLACE(IconFileLarge, '~/images/', '/images/')
WHERE IconFile LIKE '~/images/%'
Then go to Host > Host Settings and click Restart Application.
Worked for me using DNN 5.2.2 and Forum. 4.5.3. Thanks!
|
|
|
|
| |