Troubleshooting 'There was an error retrieving your content. Please check your internet connection' wher opening Assets

Overview

If you are encountering an issue where the Assets for your DNN website will not display and instead, you get a message about "There was an error retrieving your content. Please check your internet connection", this could be due to missing folders from a previously deleted site with references still in the database.

Diagnosis

Open the network tab and reproduce the issue with the Assets page. The failed API call can be observed:

/API/personaBar/assets/GetFolderContent?folderId=-1&startIndex=0&numItems=24&sorting=ItemName

Solution

Follow the steps below to resolve this issue after taking a Database Backup:

 

  1. Confirm the affected portal by using the following query to check for folders with a missing parent:
SELECT FolderID, PortalID, CONCAT('/Portals/',PortalID,'/',FolderPath) AS 'Broken Path' FROM Folders
WHERE ParentID NOT IN (SELECT FolderID FROM Folders)

 

  • Run the following query to get the FolderMappingID for the Portal.
SELECT FolderMappingID FROM FolderMappings
WHERE PortalID = <PortalID> AND MappingName = 'Standard'

Replace <PortalID> with the value gathered in the first step
 

  • Run the following query to add the root portal folder manually back into the database:
INSERT INTO Folders (PortalID, FolderPath, StorageLocation, IsProtected, IsCached, LastUpdated, CreatedByUserID, CreatedOnDate, LastModifiedByUserID, LastModifiedOnDate, UniqueId, VersionGuid, FolderMappingID, ParentID, IsVersioned, WorkflowID, MappedPath)
VALUES (<PortalID>, '', 0, 0, 0, NULL, -1, GETDATE(), -1, GETDATE(),  NEWID(), NEWID(), <FolderMappingID>, NULL, 0, NULL, '')

Replace <PortalID> & <FolderMappingID> with the relevant values.
 

  • Run the following query to set the parent folder for all the folders with a missing parent from the first query:
UPDATE Folders
SET ParentID = (SELECT FolderID FROM Folders WHERE PortalID = <PortalID> AND ParentID IS NULL)
WHERE ParentID NOT IN (SELECT FolderID FROM Folders)

 

FAQ

  1. What causes the 'Error Retrieving Content' message in DNN install?
    This error is typically caused by missing folders from a previously deleted site with references still in the database.
  2. How can I resolve the 'Error Retrieving Content' message in DNN install?
    You can resolve this issue by following the steps provided in the solution section of this article.
  3. What should I do before attempting to resolve this issue?
    Before attempting to resolve this issue, it is recommended to take a Database Backup.

Comments

0 comments

Please sign in to leave a comment.