cancel
Showing results for 
Search instead for 
Did you mean: 

'Edit Online' action not showing up in Share

warmbowski
Champ in-the-making
Champ in-the-making
I am running a fresh install of Alfresco CE 3.3.0 (2765) on CentOS 5.2 linux. I installed the full package release downloaded via the wiki 'download' link and configured it. I created a test Site in the Share interface and have uploaded documents via WebDAV webfolder connection from my Windows XP desktop. The Edit Online action will not show up in the Share interface for any uploaded MS Office documents via IE8. It doesn't show up on file list page, or on the page for a specific document. I would really like to edit these files with MS Office via WebDAV.

This is what I have done/checked:
  • I have applied the vti_module.amp to the alfresco.war and I see it listening on port 7070 when I start up Alfresco.

  • I have changed <edit-link-type> in web-client-config-custom.xml use webdav.

  • Alfresco Explorer interface shows the Edit Online button for MS Office documents and clicking it works properly (checks out doc, opens via WebDAV, saves via WebDAV back to Alfresco).

  • Mime types for MS Office documents show up properly.

  • I have emptied my browser cache many times.

  • I have made sure to empty out the tomcat caches with the clean_tomcat.sh script.

  • The div class "onActionEditOnline" shows up in the source code for the document webpage. So it seems to be in the document action list, but just hidden.
Does anyone have any suggestions as to why the Edit Online action might not be showing up in Share for me? What I don't understand is the algorithm that Share uses to decide whether to show the 'Edit Online' action button or not. Is it looking merely at then document Mime Type and the browser User Agent? Also, how does applying the vti amp to the alfresco.war allow this functionality to show up in the Share interface? Nothing was applied to Share.war.

Any help would be much appreciated.

-Paul
6 REPLIES 6

mikeh
Star Contributor
Star Contributor
There are a number checks performed before the action shows up:
1 - A remote webscript call to /alfresco/service/api/vti/serverDetails
2 - A (client-side) browser check via YUI: YAHOO.env.ua.ie !== 0
3 - The mimetype must match the list of supported mimetypes:
application/vnd.ms-excel
application/vnd.ms-powerpoint
application/msword
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
application/vnd.openxmlformats-officedocument.presentationml.presentation
application/vnd.openxmlformats-officedocument.wordprocessingml.document
4 - The server must report that the vti module is installed (comes back as part of the metadata on each document list request as "onlineEditing")
5 - Finally, the user must have "Edit" permission on the document itself.

See if you can track down which one is reporting "false". #4 and #5 are best checked with something like Firebug - look at the JSON response from the Repo.

Thanks,
Mike

warmbowski
Champ in-the-making
Champ in-the-making
I logged into share and went to a site that I set up and in which I have Manager permissions. I retrieved the JSON data (see below) via firebug in FF 3.6 for a MS Office .xlsx document (I don't know how to do this with IE). I see that the onineEditing = true, edit permissions = true, and the mime type looks proper. So that means 4,5,and 6 are fulfilled to allow online editing. Now I need to do this in IE8 to see what these look like. I need to spend some time to figure out how to do this. And post the info. Thanks for the help so far.

Do you have any suggestions about how to test #1?




{
   "metadata":
   {
      "parent":
      {
         "nodeRef": "workspace://SpacesStore/08fd50b2-009c-4a09-beea-a769ef2cd675",
         "permissions":
         {
            "userAccess":
            {
               "permissions": true,
               "edit": true,
               "delete": true,
               "cancel-checkout": false,
               "create": true
            }
         }
      },
      "onlineEditing": true
   },
   "item":
   {
   "nodeRef": "workspace://SpacesStore/17c6558d-9ad1-44d9-99c4-cc93498d242d",
   "nodeType": "cm:content",
   "type": "document",
   "mimetype": "application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
   "isFolder": false,
   "isLink": false,
   "fileName": "Report_cdr_2008-09-27.xlsx",
   "displayName": "Report_cdr_2008-09-27.xlsx",
   "status": "",
   "title": "Report_cdr_2008-09-27.xlsx",
   "description": "",
   "author": "",
   "createdOn": "06 May 2010 12:58:03 GMT-0700 (PDT)",
   "createdBy": "Paul",
   "createdByUser": "paul",
   "modifiedOn": "06 May 2010 13:00:19 GMT-0700 (PDT)",
   "modifiedBy": "Paul",
   "modifiedByUser": "paul",
   "lockedBy": "",
   "lockedByUser": "",
   "size": "18407",
   "version": "1.0",
   "contentUrl": "api/node/content/workspace/SpacesStore/17c6558d-9ad1-44d9-99c4-cc93498d242d/Report_cdr_2008-09-27.xlsx",
   "webdavUrl": "\/webdav\/Sites\/alfrescoresources\/documentLibrary\/Report_cdr_2008-09-27.xlsx",
   "actionSet": "document",
   "tags": [],
   "categories": [],
   "activeWorkflows": "",
   "isFavourite": false,
   "location":
   {
      "site": "alfrescoresources",
      "siteTitle": "Alfresco Resources",
      "container": "documentLibrary",
      "path": "\/",
      "file": "Report_cdr_2008-09-27.xlsx"
   },
   "permissions":
   {
      "inherited": true,
      "roles":
      [
         "ALLOWED;GROUP_site_alfrescoresources_SiteCollaborator;SiteCollaborator;INHERITED",
         "ALLOWED;GROUP_site_alfrescoresources_SiteManager;SiteManager;INHERITED",
         "ALLOWED;GROUP_EVERYONE;ReadPermissions;INHERITED",
         "ALLOWED;GROUP_site_alfrescoresources_SiteConsumer;SiteConsumer;INHERITED",
         "ALLOWED;GROUP_site_alfrescoresources_SiteContributor;SiteContributor;INHERITED"
      ],
      "userAccess":
      {
         "permissions": true,
         "edit": true,
         "delete": true,
         "cancel-checkout": false,
         "create": true
      }
   },
   "custom": {},
   "actionLabels":
   {
   }
   }
}

mikeh
Star Contributor
Star Contributor
For #1, just point Firefox at the webscript, e.g.: http://localhost:8080/alfresco/service/api/vti/serverDetails

Thanks,
Mike

warmbowski
Champ in-the-making
Champ in-the-making
I pointed both Firefox and IE at the webscript, and they both prompted for credentials. After logging in, the page returned with this text:
{"port": 7070}

I installed Fiddler on my Windows computer and fired up the Document page in IE, so I could record the headers and responses.

The UA used in the headers for IE is:
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

The JSON data was exactly the same as the data that I posted previously from Firebug.


Stay Tuned.  I may have some other interesting info. I'll put it in another reply. . .

warmbowski
Champ in-the-making
Champ in-the-making
I started looking at the aspects for the documents that were uploaded. I noticed that some showed the 'Versionable' aspect and some had 'No user-editable aspects applied'. Most of the documents were uploaded via Webdav, but some were uploaded via the Share flash upload interface in the doclib. I applied the 'Versionable' aspect to a document that did not have an aspect applied and now the 'Edit Online' action is visible for all MS Office files and TXT files, but only when viewing 'more' actions in a folder's list of documents. The 'Edit Online' action is still not visible when viewing the document details of any specific document. I will say that I cannot say for sure that adding the 'Versionable' aspect to a file actually made the 'Edit Online' action show up in the actions associated with a list of documents, as I was only paying close attention to the actions on the document details page, which doesn't will not show the 'Edit Online' action no matter what. But I swear that the action wasn't displayed in either place when I first posted to this forum.

I have tried to create new sites and tried to recreate my initial scenario (no 'Edit Online' action available anywhere), but I cannot.


The situation now is this:
When I upload an Office document via the Share UI flash upload, the document's aspect is set to 'Versionable', but when I upload an Office document via Win XP WebDAV (web folders), the file's aspect is NOT set. In either case, the 'Edit Online' action appears in the 'More' list of actions on the document list page, but the 'Edit Online' action does not appear on the document details page.

I am curious if anyone else sees this specific behavior, and I am also wondering if the 'Versionable' aspect should be on by default for files uploaded to Share no matter the method.

mikeh
Star Contributor
Star Contributor
The "Edit Online" action isn't currently enabled on the details page for a variety of reasons, so that's not a bug in itself.

The Versionable aspect shouldn't make a difference. Please raise a bug in JIRA if you find it's part of the equation somehow.

Thanks,
Mike