adf-content-metadata-card component

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member II

adf-content-metadata-card component

Hi,

I am using ADF 2.3.0 and ACS 5.2.1 and using <adf-content-metadata-card> component to list all properties of a node.

<adf-content-metadata-card
[node]="node"
[multi]="true"
[readOnly]="false">
</adf-content-metadata-card>

Also, configured contextRootEcm to use a different context in app.config.json which is

"contextRootEcm": "alfresco/content",

When I click on 'More Information' on the properties tab, it does not work. Checked browser console. The context does not set here whereas it perfectly works across adf application.

Not sure why this behavior, maybe context is hard-coded here. See screenshots attached for details.

Can you please check and confirm? Thanks.

13 Replies
Alfresco Employee

Re: adf-content-metadata-card component

Instead of changing the context root in the JS-API you can change the ACS url in the `app.config.json` file (ecmHost)

Active Member II

Re: adf-content-metadata-card component

Hi Denys,

Yes, I changed both host (ecmHost) and context (contextRootEcm) in ''app.config.json'' only.

The application works absolutely fine. I am able to authenticate, navigate, perform actions on node, etc. all good.

The only thing that does not work is when I click on 'More Information' available in adf-content-metadata-card component. In the browser console, I get --404 Not Found-- and when I check the REST URL, it does not have the context as set in app.config.json. Hence, it fails.

Alfresco Employee

Re: adf-content-metadata-card component

Can you try only changing the ecmHost value? typically you should not be changing contextRootEcm if you have correctly configured repository URL

Active Member II

Re: adf-content-metadata-card component

Hi,

Can you please give us a little bit more of the context? Which is the request exactly which gives you 404?

Active Member II

Re: adf-content-metadata-card component

Hi Denys,

Denys VuikaAndras Popovics

I know the default context of the repository URL is 'alfresco'.

However, the context of our repository is 'alfresco/content'. This is configured based on organization standards.

Therefore, we have set the context to 

"contextRootEcm": "alfresco/content",

Now, our adf-application works perfectly fine. Authentication, navigation, document list rendering, node actions(copy, move, delete, lock/unlock, etc) all works fine. The REST URL for these has the context as 'alfresco/content', so it renders the service fine.

But this is not the case when the application tries to get More Information in adf-metadata-card-content component.

The REST URLs built here does not take the configured context into consideration. Instead, it keeps the default.

Active Member II

Re: adf-content-metadata-card component

Hi Andras,

Requests which gives 404 when ''contextRootEcm'' is set to have a value other than default(''alfresco'') context are:

{hostname}/alfresco/s/api/classes/cm_versionable
{hostname}/alfresco/s/api/classes/cm_titled
{hostname}/alfresco/s/api/classes/cm_auditable
{hostname}/alfresco/s/api/classes/cm_author
{hostname}/alfresco/s/api/classes/cm_content

There is one other request for custom aspect, that also fails. I have not included that.

I guess these requests are based on older REST APIs as I could not find any on Alfresco Content Services REST API Explorer 

Active Member II

Re: adf-content-metadata-card component

May I ask you, whether you have Share or not?
Those API endpoints I'm afraid only accessible if you have Share.

Active Member II

Re: adf-content-metadata-card component

Hi Andras,

We are using Angular based ADF UI.

One of the OOTB ADF components that I have used is Content Metadata Card Component

Those API endpoints are requested through this very component. We have not done any changes to it.

Alfresco Employee

Re: adf-content-metadata-card component

Andras Popovics I think the 'getClass' has different context root hardcoded and it needs to be fixed: alfresco-js-api/ClassesApi.js at development · Alfresco/alfresco-js-api · GitHub