cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Google integration in 4.2. CE

chrischu
Champ in-the-making
Champ in-the-making
Hello,

how can I disable the google docs integration in Alfresco 4.2 Community Edition?

I have played with the share-custom-config.xml but it seems that there is no change in the UI

Furthermore there is no Manage Aspects in the Administrator menu.


Chris
9 REPLIES 9

loftux
Star Contributor
Star Contributor
In alfresco-global.properties try setting
googledocs.enabled=false (for the new google docs menu)
or
googledocs.googleeditable.enabled=false (for the old google docs integration)

jgionet76
Champ in-the-making
Champ in-the-making
so there's no way to disable Google Docs integration?

I've tried setting these two values and its still loading!

googledocs.enabled=false
googledocs.googleeditable.enabled=false


I still get:
10:31:16,925 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'googledocs' subsystem, ID: [googledocs, v2]
10:31:17,018 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'googledocs' subsystem, ID: [googledocs, v2] complete

any other ways?
thanks

Hi,

In 4.2.c (and 4.2.b), removing (or not selecting for installation) the googledocs amp from share (and from alfresco) disables googledocs.  In the UI, you don't see the Edit in GoogleDocs button.

If you're using the bundle installer (alfresco-community-4.2.x-installer*), you can:

1. cd [alfresco install directory]/bin
2. java -jar alfresco-mmt.jar uninstall 'org.alfresco.integrations.google.docs ../tomcat/webapps/share.war
3. tail catalina.out and wait for share to be successfully redeployed.
4. java -jar alfresco-mmt.jar uninstall 'org.alfresco.integrations.google.docs ../tomcat/webapps/alfresco.war.war

once both alfresco and share have been redeployed, go into a document's details page.  You shouldn't have the Edit in GoogleDocs button there anymore.

Does that work for you?  or do you want some other effect?

Gerald

chrischu
Champ in-the-making
Champ in-the-making
Ok with this settings you can disable the Edit in Google Docs entry in the document actions.
But you still have the menu entry in the Document Library ->> Create Content ->> Create Google Docs Document , Create Google Docs Spreadsheet …

Chris

In alfresco-global.properties try setting
googledocs.enabled=false (for the new google docs menu)
or
googledocs.googleeditable.enabled=false (for the old google docs integration)

loftux
Star Contributor
Star Contributor
Then I do not know.
Maybe not install the module if you do not intend to use it?

If you have used the installer you can replace the share.war files with the one in alfresco-community-4.2.a.zip from http://wiki.alfresco.com/wiki/Community_file_list_4.2.a

jottley
Confirmed Champ
Confirmed Champ
For GoogleDocs V2: This is a limitation of the GoogleDocs V2 integration.  There currently is no functionality that allows us to use evaluators in the create content menu callbacks.  This means we cannot dynamically turn off the items in the create content menu.  You could go into the config and comment out those menu items, by hand.  We do impose a check to see if the integration is enabled or not before we attempt to create content, but this is in the actual code and not at the presentation layer like we need.

We've discussed adding them but there is no current plans to add them.

ivan_void
Champ in-the-making
Champ in-the-making
I think it can be disabled by setting
googledocs.enabled=false
in tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/googledocs/v2/googledocs.properties

boumbh
Champ in-the-making
Champ in-the-making
This is so wrong!

And this solution <a>https://forums.alfresco.com/forum/developer-discussions/alfresco-share-development/disable-create-co...</a> involves a <em>.lib.js</em> inside an <em>include</em> folder: no easy way to apply it through an extension… What is the point of all these configurations if half of them does not work?

Sorry if I'm too harsh, my situation is critical, I know from the beginning that I've been asked for the impossible, perhaps I'm not impartial?… but Alfresco is so not helping I want to cry.

clifpeterson
Champ in-the-making
Champ in-the-making
<strong>Source of issue:</strong>

GoogleDocs includes a jar file with the following:

<blockquote>       META-INF/share-config-custom.xml </blockquote>

The file contains the following:

<config evaluator="string-compare" condition="DocumentLibrary">
     <create-content>
        <content id="google-docs" label="create-content.googledocs.document" icon="document" index="50" type="javascript">
           <param name="function">onGoogledocsActionCreateDocument</param>
      <evaluator>evaluator.doclib.google.docs.enabled</evaluator>
        </content>
       <content id="google-docs" label="create-content.googledocs.spreadsheet" icon="spreadsheet" index="51" type="javascript">
           <param name="function">onGoogledocsActionCreateSpreadsheet</param>
        </content>
        <content id="google-docs" label="create-content.googledocs.presentation" icon="presentation" index="52" type="javascript">
           <param name="function">onGoogledocsActionCreatePresentation</param>
        </content>
     </create-content>
</config>
      
Note that the &lt;config&gt; node does not have a replace="true", so the elements are added to any existing &lt;create-content&gt; subsection and thus show up on the Create menu.
      
This behavior is due to the configuration in file:

<blockquote>TOMCAT_HOME/webapps/share/WEB-INF/classes/alfresco/slingshot-application-context.xml</blockquote>
         
The Share custom configurations are loaded in the listed order via these settings.

<!– Share custom config –>
<value>classpath:alfresco/web-extension/share-config-custom.xml</value>
<value>jar:*!/META-INF/share-config-custom.xml</value>
<value>classpath:alfresco/web-extension/share-config-custom-dev.xml</value>
<value>jar:*!/META-INF/share-config-custom-dev.xml</value>
         
Thus, the additional settings from the GoogleDocs jar file are injected after share-config-custom.xml, which of course is after all the config files in the share webapp.


<strong>Solution:</strong>

Note that share-config-custom-dev.xml is configured to load following the jar file.

I verified this by putting a simple DocumentLibrary config section in share-config-custom-dev.xml with replace="true".

<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
   <create-content>
      <content id="folder" label="create-content.folder" icon="folder" index="55" type="javascript">
         <param name="function">onNewFolder</param>
      </content>
   </create-content>
   <create-content-by-template>false</create-content-by-template>
</config>
         
The folder Create menu now only allowed creation of a folder as configured.
      
<strong>SUCCESS!</strong>
      
Of course, you don't want share-config-custom-dev.xml in a production system, but there are other ways to instantiate share custom config sections using your own beans that can process following the above sequence so you can ensure the only elements in the &lt;create-content&gt; section are what you define.