Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imported site not visible to Alfresco Mobile application #16

Open
bsreid opened this issue Nov 18, 2015 · 2 comments
Open

Imported site not visible to Alfresco Mobile application #16

bsreid opened this issue Nov 18, 2015 · 2 comments

Comments

@bsreid
Copy link

bsreid commented Nov 18, 2015

I exported a demo site from a 5.0.2.1 environment, and imported it into another 5.0.2.1 environment on a different machine. When I browse the new environment using Alfresco Mobile on iOS or Android, I'm unable to see the contents of the new site on the new environment. I can successfully navigate the site on the old environment.

On Android, when I navigate into the new site using the Sites menu on the left side of the app, I get a "No Files Found" message. On iOS, I get the following message: "We hit a problem. Couldn't to access Document Library."

I can navigate into the new site in the mobile apps by going into Repository/Sites//DocumentLibrary, and see all of the files in the site, but I can't get there via the main Sites menu.

New sites that were created in Alfresco via the browser can be navigated successfully via the mobile apps. It's only the imported site that doesn't work this way.

No errors are logged in any log files (alfresco.log, share.log, solr.log, catalina, etc.). What's the difference between a conventionally-created site and an imported site that would cause this problem?

@bsreid
Copy link
Author

bsreid commented Nov 19, 2015

I found the reason for the problem, and a fix. By comparing imported sites against conventionally-created sites in the Node Browser, I found that imported sites were missing a value for the st:componentId property on the documentLibrary node. When you tap the Sites link in the mobile apps, it appears that the apps are looking only for items where st:componentId=documentLibrary. Without this value set, the app doesn't find any document library, and gives an error.

Running the following script in the JavaScript Console fixed the problem:

var docLib = search.findNode("workspace://SpacesStore/cda88071-d208-426c-84a0-6a16c1145065"); // use nodeRef of the documentLibrary
docLib.properties["st:componentId"] = "documentLibrary";
docLib.save();

@wabson
Copy link
Owner

wabson commented Dec 11, 2015

Thanks for the feedback and glad that helps. I'll see if I can modify the import script to set that property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants