I get asked this question a lot. When running Share from the Alfresco SDK, the admin console is broken out of the box – it simple displays an empty page as shown below.
The fix?
To fix this issue you simply turn off development mode. You can do this by editing this file:
src/test/resources/alfresco/web-extension/share-config-custom.xml
Change
<mode>development</mode>
with
<mode>production</mode>
Restart share to have the changes picked up.
Why is this happening?
To support hot reloading of server side Javascript files in Share, we have to turn on development mode. This setting will tell the Rhinoscript Processor not to compile and cache the JS files. Cool, we can now change server side JS files and have the changes picked up, without having to restart or refresh web scripts.
But… Due to a known bug in the Surf framework (ALF-9970) this will break the admin consoles in Share.
Alfresco has, for some reason, decided not to fix this bug, so either we can have hot reloading of server side JS or a working admin console.
The permanent fix?
Development mode is an older trick. It solves some of the old -min.js things, most which are not even used any longer. The only thing we want from the “old” development mode is to tell Rhino no to cache the compiled JS files. This could easily be done by extracting this into a config option in XML instead of having it happen via the development mode tag. This change needs to be made in the Surf framework so I expect hope this change makes it into the product in a later release, as it should be a small change.