How to solve conflicts between kendo.all.min.js and other JS file ?

0 Answers 60 Views
PDFViewer
Alexandre
Top achievements
Rank 2
Iron
Iron
Iron
Alexandre asked on 01 May 2022, 12:57 PM

Hello,

I have an existing project where I am trying to use the PDF Viewer control. But in this project I have a JS file callled vendors.bundle.js wich is causing some type of conflict with kendo.all.min.js, making an error of "kendoPDFViewer is not a function" appear at the console.

I have tried putting the scripts references at different points of the application other then the page itself, but that only caused more errors.

I removed the reference to the file vendors.bundle.js, but that made several parts of the project stop working.

So, my question is how do I find out what kind of conflict is this, and how to solve it.

Regards,

Alexandre

Mihaela
Telerik team
commented on 04 May 2022, 03:15 PM

Hi Alexandre,

Please ensure that jQuery and "kendo.all.min.js" files are included before the initialization of the Upload and the PDFViewer widgets. Also, the PDFViewer requires the PDF.js library to be added to the page.

I am attaching a runnable sample based on the shared code snippets. Would you please modify it to replicate the behavior you are experiencing, so we can observe it locally and find out what is causing the problem?

Alexandre
Top achievements
Rank 2
Iron
Iron
Iron
commented on 05 May 2022, 11:29 AM

Hello Mihaela,

I was unable to modify your project to include my JS files, but I have replaced my JS script links with the ones from your project and it worked.

Thanks for your help,

Alexandre

Mihaela
Telerik team
commented on 05 May 2022, 01:09 PM

Hi Alexandre,

It is great that the issue is resolved at your end.

Please keep in mind that the version of the client-side resources should match with the version of the installed Telerik UI for ASP.NET Core package.

No answers yet. Maybe you can help?

Tags
PDFViewer
Asked by
Alexandre
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or