Uncaught error when opening Modal

Hi

We open a Model with this code

        client.interface.trigger('showModal', {
            title: 'Order eröffnen',
            template: 'views/modalcreateeditorder.html',
            data: modalData
        });

We always get the following exception:

image

We think it is a Bug. Do you have any suggestions?

Hi @Benjamin,

Could you please try the below code and let me know.

const openModal = (client) =>{

    client.interface.trigger("showModal", {
        title: `sometitle`,
        template: "index.html",
        data:{
          data1,
          data2
        }
      })
}

Make sure the path is correct and make sure the client object is not null/ undefined

Hi @Bene_Immanuel

I tested with your suggestion, but it doesn’t change anything. Also I can confirm, that the client object is defined.
This app works as a full_page_app and also with location ticket_sidebar. We have the error only when we trigger the modal from the full_page_app but not when we trigger the modal from the location ticket_sidebar.

@Raviraj Do you have any hint, why this works with app location ticket_sidebar but not from app location full_page_app?

I see…

I never used modal in full-page applications, this might be the way they designed it to be…

let’s wait for @Raviraj’s input.

Hi @Benjamin,

I’m able to open the modal in the full_page_app placeholder with your provided Interface method code.

I also get the same list of errors on the browser console. I’m not sure what the impact of these errors is.

Do you also see the modal open fine? Does any other specific functionality fail in the modal?

Hi @Raviraj

Thanks for your answers. The modal opens fine and it looks, that no functionality fails, besides the logged errors.

If I open the modal in the sidebar app, I’will get a respData Object {message: “Ok”}

If I open the model in the full page app, the respData Object is missing. It looks like this is causing the error.

Maybe this is a bug in the app-client?

@Benjamin If no functionality of the app fails, we are fine here, I think.

There can be many errors printed in the browser console. Even if there are errors from the app, the client is loaded again and again until it is imported. It could be from one of the times it was not loaded yet.

If anything is not working, please let me know and I can report the same back to the respective team. Otherwise, I also see those errors. But, I don’t know where do they come from and what do they mean.