cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori Elements Multitenant error ViewSwitchContainer/.fragment.xml could not be loaded

SamueleBarzaghi
Participant
0 Kudos

Hi,

We have a fiori elements app deployed in SCP and published in SCP Portal Central as a saas multitenant app.

When we launch the app it get stucked.

Logs in chrome console are:

2020-10-06 23:18:36.043935 [ 8] Removed attribute height - <ViewSwitchContainerItem height="{= ${visualizationDefinition>type} === 'Table' ? '100%' : undefined}"> sap.ui.core.util.XMLPreprocessor

2020-10-06 23:18:36.045000 [ 9] fragmentName = sap.fe.templates.controls.ViewSwitchContainer. - <core:Fragment fragmentName="sap.fe.templates.controls.ViewSwitchContainer.{visualizationDefinition>type}" type="XML"/> sap.ui.core.util.XMLPreprocessor

Error: resource sap/fe/templates/controls/ViewSwitchContainer/.fragment.xml could not be loaded

"visualizationDefinition>type" is empty and so the file name of the template is incomplete.

The same app is also deployed in SCP in one other subaccount as a simple no multitenant app and we have no problems.

In this case the logs are:

2020-10-06 23:42:11.670820 [ 8] height = 100% - <ViewSwitchContainerItem height="{= ${visualizationDefinition>type} === 'Table' ? '100%' : undefined}"> sap.ui.core.util.XMLPreprocessor

2020-10-06 23:42:11.672060 [ 9] fragmentName = sap.fe.templates.controls.ViewSwitchContainer.Table - <core:Fragment fragmentName="sap.fe.templates.controls.ViewSwitchContainer.{visualizationDefinition>type}" type="XML"/> sap.ui.core.util.XMLPreprocessor

Opening request #984 GET https://sapui5.hana.ondemand.com/resources/sap/fe/templates/controls/ViewSwitchContainer/Table.fragm... -

"visualizationDefinition>type" is "Table" and the file name of the template is correct.

The problem seems related to the model attribute "visualizationDefinition>type" without binding, it's used by:

https://sapui5.hana.ondemand.com/resources/sap/fe/templates/controls/ViewSwitchContainer/ViewSwitchC...

Has anyone run into the same problem?

Thanks,

Sam

maheeth7
Explorer
0 Kudos

Hi Sam,

Thanks for letting us know about your issue. Usually, this problem used to appear in UI5 versions before 1.83 when there is no default line item present and if you are trying to load a ListReport app.

Can we access your app to check the ui5 version, metadata, and manifest so that we have a better understanding of the issue?

Thanks and Regards,

Maheeth

SamueleBarzaghi
Participant
0 Kudos

Hi Maheeth,

App is using the latest 1.82.1 release, how can I try with version 1.83? seems to yet released.

App is secured, which email do I need to authorized?

Metadata:

https://2630sub2-dev-cap-template-approuter.cfapps.us10.hana.ondemand.com/srv_api/services/$metadata

App manifest:

https://2630sub2-dev-cap-template-approuter.cfapps.us10.hana.ondemand.com/comalteaupsolutionsaccessr...

P.S. the metadata are generated by a CAP service.

Thank you for support

Regards,

Sam

SamueleBarzaghi
Participant
0 Kudos

Hi maheeth7,

I can confirm, the metadata are missing of the default line item annotations.

I will investigate why CAP is not serving these annotations in the metadata when multitenant option is set.

Thank you for your support!

Regards,

Sam

Accepted Solutions (1)

Accepted Solutions (1)

SamueleBarzaghi
Participant
0 Kudos

Hi,

knowledge share: the cap build rules with the "options.model.app" were in the .cdsrc.json but this file was not deployed in the mta therefore no annotations for the fiori elements tables.

Moving the building rules directly into the package.json file solved.

{
    "build": {
        "target": "gen",
        "tasks": [
            { "src": "db", "for": "hana", "options": { "model": ["db", "srv", "app"] } },
            { "src": "srv", "for": "node-cf", "options": { "model": ["db", "srv", "app"] } },
            {
                "src": ".",
                "for": "mtx",
                "dest": "srv"
            }
        ]
    }
}


Answers (0)