cancel
Showing results for 
Search instead for 
Did you mean: 

Problem accessing imported site from Mobile

davidd2go
Champ on-the-rise
Champ on-the-rise

Hi

I have an Alfresco 5.1.g environment running in which I imported several sites from a different installation using Will Abson's Python scripts.

This worked quite well but I encounter a problem accessing those sites from the iOS mobile app.

In the app the imported sites are visible, but when I try to access the content the app gives an error message: "Couldn't Access Document Library. Check that you have access rights to do this.".

Accessing the sites through Share is no problem.

The sites are public so that should also not be the problem. If I search for documents in the iOS app, the search results will contain documents from the imported sites and I have no problem accessing those documents from the search results.

Also when I make a new site within the environment (so not imported) the iOS app can access the new site Document Library in the usual way.

The Alfresco logs do not show any errors.

Anybody know what causes this problem and have a suggestion for a workaround?

Regards,

David

1 ACCEPTED ANSWER

Hi

I found the problem by doing the comparison Douglas suggested.

There were two properties and one aspect missing from the imported site. See the code below for details.

Only one of the properties is crucial in solving the problem with the app: st:componentId

I solved the problem by executing some javascript in the javascript console.

The code snippet is below:

var siteName = <insert-your-sitename-here>;

var theSite = companyhome.childByNamePath("Sites/" + siteName );
var theLib = theSite.childByNamePath( "documentLibrary" );
theLib.addAspect("st:siteContainer");
theLib.properties["cm:description"] = "Document Library";
// This last one is the crucial property for solving the problem with access from the app
theLib.properties["st:componentId"] = "documentLibrary";
theLib.save();

Will Abson‌, maybe this interesting for you as well?

Regards,

David

View answer in original post

2 REPLIES 2

douglascrp
World-Class Innovator
World-Class Innovator

Hello.

I don't know the cause, but I guess an easy way to check what is going on is to check the site and the document library folder for one of the imported and compare its properties and permissions with those in the new site you created manually.

You can do that by using the Node Browser tool.

It might be a property not set, or even a required aspect attached.

Other thing is to check how the permissions are set.

If you can, please, share that information here, as without more details, it will be hard to help you.

Hi

I found the problem by doing the comparison Douglas suggested.

There were two properties and one aspect missing from the imported site. See the code below for details.

Only one of the properties is crucial in solving the problem with the app: st:componentId

I solved the problem by executing some javascript in the javascript console.

The code snippet is below:

var siteName = <insert-your-sitename-here>;

var theSite = companyhome.childByNamePath("Sites/" + siteName );
var theLib = theSite.childByNamePath( "documentLibrary" );
theLib.addAspect("st:siteContainer");
theLib.properties["cm:description"] = "Document Library";
// This last one is the crucial property for solving the problem with access from the app
theLib.properties["st:componentId"] = "documentLibrary";
theLib.save();

Will Abson‌, maybe this interesting for you as well?

Regards,

David