backdrop-contrib / pdfjs

PDF.js project enables you to display PDF files in a web reader, using Mozilla's PDF.js library
GNU General Public License v2.0
1 stars 1 forks source link

pdfjs not working on backdrop 1.29.0 #7

Open JohnGraffio opened 2 months ago

JohnGraffio commented 2 months ago

The viewer displays a grey background with nothing on it. It doesn't seem to get a hold of the file.

I tried using this widget to display from public and private file systems. Neither worked. I then tried shortening file names. No result.

I even downloaded the latest version, 4.6.82, no change. My PHP version is 8.1.29.

laryn commented 2 months ago

Was it working before in your site, or is this a fresh install? Anything in the logs or console?

sudipto68 commented 1 month ago

We have faced the same error in one of our projects. Our module version was 1.x-1.1.1. Then we have downgraded the version to 1.x-1.1.0, It started working again. I think the newer version has some problems. I found these errors on the browser console. error

argiepiano commented 1 month ago

Have you tried clearing your browser's cache? Is there a chance your site is trying to use a locally cached version of the library?

laryn commented 1 month ago

I just spun up a Backdrop demo site from backdropcms.org (to make sure it wasn't my usual environment) and installed the module. It worked as I would expect.

Given that multiple people have had an issue, though, I'd like to chase this down. Any further information you can provide @JohnGraffio or @sudipto68 to make it possible to reproduce the issue would be appreciated.

sudipto68 commented 1 month ago

@laryn We have used the latest backdrop version 1.29.0. As I already said we didn't find this error on version 1.x-1.1.0 but found in the latest version. And I have already added the error that I have found in the browser console. When the error occurs the files were showing as pdf.mjs and viewer.mjs and now in the old version when it is working it is getting the files as pdf.js and viewer.js

sudipto68 commented 3 weeks ago

@laryn We have faced the same issue on another site after upgrading the backdrop version and also the module version to 1.x-1.1.1.

laryn commented 2 weeks ago

@sudipto68 Are you able to test if updating the library version helps? We're bundling 4.4.x and it looks like the latest release is 4.7.x.