Fixing Broken Site dashboard

Alfresco User and Site Dashboard

The alfresco user dashboard is the out of the box landing page when a user successfully logs in Alfresco Share and the alfresco site dashboard is default entry point in a Share site. Down the years working with alfresco, a few times we came across issues with user or site dashboard being broken. Hence we decided it would be a good idea to write a blog about what is involved in the user or site dashboard and how it can be fixed without having to restart Alfresco.

User and Site dashboard under the hood

The backbone of the dashboard is an xml file called dashboard.xml. The dashboard.xml gets built dynamically that is, the user dashboard gets created when you first login and the site dashboard when the site is first accessed. The dashboard.xml is stored in the alfresco repository under a hidden directory.

The dashboard.xml hold entries for dashlets, dashboard layout components, dashboard title, description and any configured links and of course depending on whether it’s a user or site dashboard the entries would vary.

In the past when we still had the old Alfresco Explorer GUI, the dashboard.xml could be modified easily from the front-end. But nowadays with Alfresco Share we need to do few extra steps to be able to edit the dashboard.xml.

Accessing the dashboard.xml

The node browser provides an easiest way to browse through the alfresco repository and that’s what we going to use.  So as shown below, we go to the Node Browser from the Admin Tools in Share then click on the repository root nodeRef.

On the presented page we click on app:company_home and then on the next page we click on st:sites. The cm:surf-config is the hidden folder which holds the dashboard.xml .

User dashboard.xml

Alfresco Node Browser

 

The surf-config folder located at /app:company_home/st:sites/cm:surf-config has configs related to the User dashboard only. The user dashboard.xml can be found under /app:company_home/st:sites/cm:surf-config/cm:pages/cm:user

Site dashboard.xml

Each Share site has its own surf-config folder which in turn holds the site dashboard.xml.  So example if we have a site called Seedim Test Site, then the site dashboard.xml would be located at the following.

/app:company_home/st:sites/cm:seedim-test-site/cm:surf-config/cm:pages/cm:site/cm:seedim-test-site/cm:dashboard.xml

Fixing a broken Site Dashboard

Now that we know where the site dashboard.xml is, let’s see how we can fix it if it gets corrupted. Before we moved to how to fix a broken site dashboard, we would like to point out that in most cases the dashboard.xml got corrupted as part of an upgrade or migration. For example, while upgrading from alfresco 4.0.x to 4.2.0 for one of our clients, the following tags were not added to the upgraded dashboard.xml.

<title-id>page.siteDashboard.title</title-id>

<description-id>page.siteDashboard.description</description-id>

So there are various ways to fix a corrupted or broken dashboard such as removing the sys:hidden aspect from the surf-config folder and then uploading the fixed version of dashboard.xml from Share or alternatively modifying the content of the dashboard.xml via a script. In the example mentioned, we had to use a script since there were more than a hundred of site dashboards to fix.

Alfresco Surf Command Console

Once the broken or corrupted dashboard.xml has been fixed, in order for the changes to take effect we have to either restart Alfresco or refresh the surf objects.  Alfresco is shipped out of the box with a surf command console which allows refreshing the surf objects. The Alfresco surf console can be accessed through the following url;

http://{host}:{port}/share/page/console

Then click on Refresh Object Registry button as shown below.

 Alfresco Surf Command Console

Conclusion

We tried to provide a simplified way of how we can fix a broken site dashboard without causing an outage. We also described where the dashboard.xml file is located for both user and site dashboards and also they can be accessed.