cancel
Showing results for 
Search instead for 
Did you mean: 

Can not change root 'Repository'

3snet
Champ in-the-making
Champ in-the-making
Hello,

I come to you asking for your help because, since migration of 3.4b to 3.4c, I encounter a problem I'm not sure if this is a regression bug or simply a misuse .
In fact, with version 3.4b I could change the root of a repository to display the sub-space I wanted to show users instead of displaying all the existing tree by default in the root (Data Dictionary, Guest Home, Imap Home,Sites, User Homes, etc ….).

Extract the file "share-config-custom.xml" :
      
<!– Repository Library config section –>
   <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
      <!–
         Whether the link to the Repository Library appears in the header component or not.
      –>
      <visible>true</visible>
      <!–
         Root nodeRef for top-level folder.
      –>
     <root-node>alfresco://company/home/Sites/contrats/documentLibrary/</root-node>

      <tree>
         <!–
            Whether the folder Tree component should enumerate child folders or not.
            This is a relatively expensive operation, so should be set to "false" for Repositories with broad folder structures.
         –>
         <evaluate-child-folders>false</evaluate-child-folders>

         <!–
            Optionally limit the number of folders shown in treeview throughout Share.
         –>
         <maximum-folder-count>500</maximum-folder-count>
      </tree>
   </config>

Now, with version 3.4c (French edition) this is impossible because, even with the above setting, the "Repository" button (on the Share interface) displays the entire tree without taking into account the path I indicated in the file "share-config-custom.xml" for item "<root-node>.

Could you tell me, please, if it is a regression bug introduced in version 3.4c or is there another parameter to be changed other than the file "config-share -custom.xml".

Thank you in advance for your help.

Regards.
8 REPLIES 8

mikeh
Star Contributor
Star Contributor
That format should never have worked, as the documentation above the value states you need a nodeRef.

As of 3.4.c, the parser has been updated to allow for an xpath instead. Here's the comment from the share-config-custom.xml.sample in 3.4.c:
      <!–
         Root nodeRef or xpath expression for top-level folder.
         e.g. alfresco://user/home, /app:company_home/st:sites/cm:site1
         If using an xpath expression, ensure it is properly ISO9075 encoded here.
      –>
      <root-node>alfresco://company/home</root-node>

So you could have, e.g.
<root-node>/app:company_home/st:sites/cm:contrats/cm:documentLibrary</root-node>

Thanks,
Mike

3snet
Champ in-the-making
Champ in-the-making
Thank you Mike

it works very well.

I have a second question on the same topic, if I may. Indeed, in the "repository" I have two spaces "Contrats" and "Facture."
Is it possible to have two links to the repository that each shipment on one of the spaces ? For example:

…/contrats/documentlibrary
…/factures/documentlibrary

I know I can do without going through the reposirtory with URLs:


    <header replace="true">
        <app-items>
      …      
      <item type="link" id="contrats" label="Contrats" description="Contrats" icon="../filetypes/generic-contrats-16.png">/site/contrats/documentlibrary </item>
      <item type="link" id="factures" label="Factures" description="Factures" icon="../filetypes/generic-factures-16.png">/site/factures/documentlibrary</item>
         
      <!– Vibles pour le compte "admin" uniquement –>
      <item type="link" id="repository" permission="admin">/repository</item>
   </app-items>
       <dependencies>
            <css src="/modules/create-site.css" />
            <css src="/modules/header/sites.css" />
            <js src="/modules/create-site.js" />
            <js src="/modules/header/sites.js" />
        </dependencies>
    </header>
   </config>

But now, doing this as I no longer have the option of using the filter categories, so that's why I want to go through the repository.


Thank you in advance for your help.

Regards.

mikeh
Star Contributor
Star Contributor
You can create shortcuts in the Explorer client (/alfresco) but these won't navigate to the Share Site from the Repository view. For example:

If I have "site1" which contains the "documentLibrary" space. In Explorer, I create a shortcut to that space and paste a link into Company Home.

Within Share's Repository browser, the shortcut will drill down into that documentLibrary folder, but won't navigate to the "site1" site. That's because when in "Repository browsing mode" we don't swap out into "Site browsing mode".

However, pasting the shortcut to "site1/documentLibrary" into a folder within "site2" *will* navigate to "site1" as we're already in "Site mode".

Does any of that make sense?

Thanks,
Mike

3snet
Champ in-the-making
Champ in-the-making
And in this case what is the url to open this space via this link?
Otherwise, is it possible to set the root of the "repository" and create two different links for the two space as follows :


   <!– Global config section –>
   <config replace="true">
      <flags>
         <!–
            Developer debugging setting to turn on DEBUG mode for client scripts in the browser
         –>
         <client-debug>false</client-debug>
         <!–
            LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
            This flag automatically activates logging on page load.
         –>
         <client-debug-autologging>false</client-debug-autologging>
      </flags>
     
    <header replace="true">
        <app-items>
          …     
          <item type="link" id="contrats" label="Contrats" description="Contrats" icon="../filetypes/generic-contrats-16.png">/repository/contrats/documentlibrary </item>
         <item type="link" id="factures" label="Factures" description="Factures" icon="../filetypes/generic-factures-16.png">/repository/factures/documentlibrary</item>
          … 
         <!– Repository Library config section –>
        <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
        <!–
         Whether the link to the Repository Library appears in the header component or not.
        –>
       <visible>true</visible>
       <!–
         Root nodeRef for top-level folder.
        –>
       <root-node>/app:company_home/st:sites</root-node>      
        …

Regards.

mikeh
Star Contributor
Star Contributor
The easiest way to find the URL is browse to the space you want and grab it from the browser's address bar.

Thanks,
Mike

3snet
Champ in-the-making
Champ in-the-making
Hi,

Here is an example URL (which contains special character) that I would like to link to a button on the header is :

http://my-domain.com:8080/share/page/repository#filter=path%7C/CV-th%25E8que/Archive&page=1

How and where exactly should I declare in the file "share-config-custom.xml"

Thanks,

mikeh
Star Contributor
Star Contributor
The only place you can add URLs is the header. If you want path navigation then that's folder shortcuts.

Thanks,
Mike

3snet
Champ in-the-making
Champ in-the-making
Sorry to insist, but I'm not sure I understood what I could do. Do you mean I have to change the file "share-config-custom.xml" as follows :


   <!– Global config section –>
   <config replace="true">
      <flags>
         <!–
            Developer debugging setting to turn on DEBUG mode for client scripts in the browser
         –>
         <client-debug>false</client-debug>
         <!–
            LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
            This flag automatically activates logging on page load.
         –>
         <client-debug-autologging>false</client-debug-autologging>
      </flags>
     
    <header replace="true">
        <app-items>
          …     
          <item type="link" id="contrats" label="Contrats" description="Contrats" icon="../filetypes/generic-contrats-16.png">/repository#filter=path%7C/contrats/Archive&page=1
</item>
         <item type="link" id="factures" label="Factures" description="Factures" icon="../filetypes/generic-factures-16.png">/repository#filter=path%7C/factures/Archive&page=1
</item>
          … 
         <!– Repository Library config section –>
        <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
        <!–
         Whether the link to the Repository Library appears in the header component or not.
        –>
       <visible>true</visible>
       <!–
         Root nodeRef for top-level folder.
        –>
       <root-node>/app:company_home/st:sites</root-node>     
        …

Does this URL format is supported in Alfresco Share? If so how should write special characters ?

Thanks.