Uploaded image for project: 'Share Application'
  1. Share Application
  2. SHA-489

Internal Share amp custom configuration does not get overwritten by shared/classes/alfresco/web-extension/share-config-custom.xml


    • Bug Priority:
      Category 2
    • Template:


      If you have a custom share config customisation inside the META-INF folder of your share maven amp project, and you try to overwrite it on the tomcat shared/classes/alfresco/web-extension/share-config-custom.xml that doesn't happen. So if your configuration was supposed to be a default one that people could overwrite on their installs that is not possible. The workaround is to remove it from the amp (or rename it as .sample) so that only the configuration in tomcat shared/classes/alfresco/web-extension/share-config-custom.xml is read (making it mandatory).

      An example where I found this issue was on this project https://bitbucket.org/ruijmfernandes/fedsearch/overview.

      Steps to reproduce:
      1 - Extract the mentioned project and rename the file feddash-share / src / main / resources / META-INF / share-config-custom.xml.sample removing the .sample.
      2 - Build both amps for repository and share.
      3 - Configure as outlined on the Readme document at the root. (Use the same local alfresco repository as remote if you want). Include an overwrite of the default configuration in the tomcat share-config-custom.xml for example (by default names are small and big and here we are changing to small2 and bigger2):

      <config replace="true">
      <fedSearchForms>small2;select * from cmis:document where cmis:name like '%

      {Name}%'|bigger2;select c.,t. from cmis:document as c join cm:titled as t on c.cmis:objectId = t.cmis:objectId where c.cmis:name like '%{Name}

      %' OR t.cm:title like '%


      %' OR t.cm:description like '%


      %' or contains(c,'



      (the line breaks you see on the xml piece above are introduced by the jira previewer)
      4 - Apply amps and start alfresco/share.
      5 - Navigate to the custom federated search page on Share header menu.
      6 - Select Forms as the search type you want to execute.
      7 - It will show still small and bigger and not the overwritten configuration small2 and bigger2.

      If you remove the internal share-config-custom.xml (or rename the extension for the file not to be picked up), rebuild the amp, reapply and restart, then it will show the configuration you set it on the external tomcat share-config-custom.xml, but that should not be necessary.





              • Assignee:
                rfernandes Rui Fernandes
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created:

                  Structure Helper Panel