2024 Sep 30 3:54 PM - edited 2024 Sep 30 3:56 PM
After upgrading to FPS1, my Fiori application is no longer working, when it is started from the launchpad. Starting it by using its full URL is working fine, but when I run it from the launchpad I get these errors:
Uncaught (in promise) TypeError: this.getRouter().initMaster is not a function
Uncaught (in promise) TypeError: this.getOwnerComponent() is undefined
I don't get any of them on older system or when the application is hosted on the BTP.
Here is the part of the source code where the errors occur. I can post more if required:
], function (UIComponent, Device, JSONModel, /* ... */) {
"use strict";
/* ... */
return UIComponent.extend("xxx.xxx.Component", {
/* ... */
init: function () {
var mConfig = this.getMetadata().getConfig();
var oParameters = this.getComponentData().startupParameters;
var aUrlParametersForEveryRequest = ["sap-server", "sap-client", "sap-language"];
for (var parameter in oParameters) {
aUrlParametersForEveryRequest.push(parameter);
}
// Create and set the ODataModel
var oModel = models.createODataModel({
urlParametersForEveryRequest: aUrlParametersForEveryRequest,
url: this.getMetadata().getConfig().urlPrefix + this.getMetadata().getConfig().serviceUrl,
config: {
metadataUrlParams: {
"sap-documentation": "heading"
}
},
startUpParams: this.getComponentData().startupParameters
});
this.setModel(oModel);
this._createMetadataPromise(oModel);
// Set the i18n model
this.setModel(models.createResourceModel(mConfig.i18nBundle), "i18n");
// Set the device model
this.setModel(models.createDeviceModel(this.geMode()), "device");
// Set the FLP model
//this.setModel(models.createFLPModel(), "FLP");
// Initialize the error handler with the component
this._oErrorHandler = new ErrorHandler(this);
// Call the base component's init function
UIComponent.prototype.init.apply(this, arguments);
/* ... */
// Create the views based on the url/hash
models.setRouter(this.getRouter());
this.getRouter().initMaster();
What changes do I have to make, so that this application will run on FPS1 system while still being compatible to older systems?
Request clarification before answering.
Did you invalidated all caches after the upgrade?
Please check 2319491 - How to clean up the cache after applying changes that affect SAP Fiori apps - SAP for Me and https://help.sap.com/docs/CARAB/5f6a0c50ac324b0395738c1ce0fe14c6/ee20517c180e4c3890b8b6c844224cec.ht...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
34 | |
21 | |
14 | |
8 | |
5 | |
4 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.