<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic share-header.lib.js override doesn't work in Alfresco SDK 3.0 in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/share-header-lib-js-override-doesn-t-work-in-alfresco-sdk-3-0/m-p/28611#M12210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have built a project using Alfresco SDK 3.0 and tried to override the getShareServices() in the share-header.lib.js file. I created the modified share-header.lib.js in the following directory of SDK folder sites-webscripts/&lt;/P&gt;&lt;P&gt;sites-webscripts/com/alfresco/share/imports/&lt;/P&gt;&lt;P&gt;and my extension file is like as follow&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;module&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;id&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;custom shareService&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=""&gt;id&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;version&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;1.0&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;version&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;auto-deploy&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;true&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;auto-deploy&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;customizations&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;customization&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;targetPackageRoot&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;org.alfresco.share.imports&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=""&gt;targetPackageRoot&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;sourcePackageRoot&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;com.alfresco.share.imports&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=""&gt;sourcePackageRoot&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;alwaysApply&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;webscript&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;share-header&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=""&gt;webscript&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;alwaysApply&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;customization&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;customizations&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;/&lt;/SPAN&gt;module&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;But the changes are not applied, though the new module is getting registered. Do I need to add anything more?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Jun 2017 08:59:30 GMT</pubDate>
    <dc:creator>dmahendrarajah</dc:creator>
    <dc:date>2017-06-30T08:59:30Z</dc:date>
    <item>
      <title>share-header.lib.js override doesn't work in Alfresco SDK 3.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-header-lib-js-override-doesn-t-work-in-alfresco-sdk-3-0/m-p/28611#M12210</link>
      <description>Hi,I have built a project using Alfresco SDK 3.0 and tried to override the getShareServices() in the share-header.lib.js file. I created the modified share-header.lib.js in the following directory of SDK folder sites-webscripts/sites-webscripts/com/alfresco/share/imports/and my extension file is lik</description>
      <pubDate>Fri, 30 Jun 2017 08:59:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-header-lib-js-override-doesn-t-work-in-alfresco-sdk-3-0/m-p/28611#M12210</guid>
      <dc:creator>dmahendrarajah</dc:creator>
      <dc:date>2017-06-30T08:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: share-header.lib.js override doesn't work in Alfresco SDK 3.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-header-lib-js-override-doesn-t-work-in-alfresco-sdk-3-0/m-p/28612#M12211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The &lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;targetPackageRoot is incorrect. You are trying to target library scripts, but the&amp;nbsp;&lt;SPAN&gt;targetPackageRoot is actually meant to target the actual web scripts that render a particular page.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;&lt;SPAN&gt;Also, you cannot override a function (&lt;SPAN style="background-color: #ffffff;"&gt;getShareServices) using the "customization" approach. The original code will already have been run by the point your code is called. Your customisation is supposed to act like a post-processor and modify the result of the original code (in the web script model).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2017 10:17:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-header-lib-js-override-doesn-t-work-in-alfresco-sdk-3-0/m-p/28612#M12211</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-06-30T10:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: share-header.lib.js override doesn't work in Alfresco SDK 3.0</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-header-lib-js-override-doesn-t-work-in-alfresco-sdk-3-0/m-p/28613#M12212</link>
      <description>&lt;P&gt;I have achived same goal as below:&lt;/P&gt;&lt;P&gt;1) Extention model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;extension&amp;gt;&lt;BR /&gt;&amp;lt;modules&amp;gt;&lt;BR /&gt;&amp;lt;module&amp;gt;&lt;BR /&gt;&amp;lt;id&amp;gt;Add custom menu item to header&amp;lt;/id&amp;gt;&lt;BR /&gt;&amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;BR /&gt;&amp;lt;auto-deploy&amp;gt;true&amp;lt;/auto-deploy&amp;gt;&lt;BR /&gt;&amp;lt;customizations&amp;gt;&lt;BR /&gt;&amp;lt;customization&amp;gt;&lt;BR /&gt;&amp;lt;targetPackageRoot&amp;gt;org.alfresco.share.header&amp;lt;/targetPackageRoot&amp;gt;&lt;BR /&gt;&amp;lt;sourcePackageRoot&amp;gt;org.alfresco.share.imports&amp;lt;/sourcePackageRoot&amp;gt;&lt;BR /&gt;&amp;lt;/customization&amp;gt;&lt;BR /&gt;&amp;lt;/customizations&amp;gt;&lt;BR /&gt;&amp;lt;/module&amp;gt;&lt;BR /&gt;&amp;lt;/modules&amp;gt;&lt;BR /&gt;&amp;lt;/extension&amp;gt;&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;You can override your&amp;nbsp;&lt;SPAN&gt;getShareServices() by updating in the&amp;nbsp;share-header.lib.js&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3) Place your updated share-header.lib.js in same folder where&amp;nbsp;share-header.get.js and update path like this where your&amp;nbsp;share-header.lib.js reside in the&amp;nbsp;share-header.get.js&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;import resource="classpath:/alfresco/web-extension/site-webscripts/org/alfresco/share/imports/share-header.lib.js"&amp;gt;&lt;BR /&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 19:55:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-header-lib-js-override-doesn-t-work-in-alfresco-sdk-3-0/m-p/28613#M12212</guid>
      <dc:creator>plusyoursoftech</dc:creator>
      <dc:date>2020-11-21T19:55:40Z</dc:date>
    </item>
  </channel>
</rss>

