TwisterMc / pdfjs-viewer-shortcode

A Wordpress plugin for embedding PDFs using Mozilla's Excellent PDF.js
https://wordpress.org/plugins/pdfjs-viewer-shortcode/
Apache License 2.0
7 stars 5 forks source link

An error occurred while loading the PDF #16

Closed ELMOKS214 closed 2 years ago

ELMOKS214 commented 2 years ago

HI,

I need some help, all of the pages using the plugin got an error viewing the PDF.

Please see screen shots and link below:

Screenshot (208)

[pdfjs-viewer url="https%3A%2F%2Fwww.philippineconsulatela.org%2Fwp-content%2Fuploads%2F2021%2F08%2FADVISORY-Deadline-of-Overseas-Voter-Registration-Corrected-Date.pdf" viewer_width=100% viewer_height=800px fullscreen=true download=false print=false]

Thank you.

TwisterMc commented 2 years ago

The PDF should not be encoded in the editor. How did you generate that URL?

It should be https://www.philippineconsulatela.org/wp-content/uploads/2021/08/ADVISORY-Deadline-of-Overseas-Voter-Registration-Corrected-Date.pdf assuming your website starts with https://www

ELMOKS214 commented 2 years ago

The PDF should not be encoded in the editor. How did you generate that URL?

It should be https://www.philippineconsulatela.org/wp-content/uploads/2021/08/ADVISORY-Deadline-of-Overseas-Voter-Registration-Corrected-Date.pdf assuming your website starts with https://www

It was embedded using your pdfj plugin.

Thanks for the quick reply.

TwisterMc commented 2 years ago

Are you using the classic editor or the Gutenberg block? I'm trying to figure to how to re-create the issue.

ELMOKS214 commented 2 years ago

Are you using the classic editor or the Gutenberg block? I'm trying to figure to how to re-create the issue.

Below is the editor that im currently using right now, before I dont have a problem with the PDJF Viewer.

Screenshot (209)

TwisterMc commented 2 years ago

Some encoding was done for security reasons. I'll do some digging to see if I can't figure out why you're seeing that.

Are you running the latest version? 2.1.2

ELMOKS214 commented 2 years ago

Some encoding was done for security reasons. I'll do some digging to see if I can't figure out why you're seeing that.

Are you running the latest version? 2.1.2

Yes, i have the latest version.

TwisterMc commented 2 years ago

I think it's a caching issue. Can you try clearing your cache?

ELMOKS214 commented 2 years ago

I think it's a caching issue. Can you try clearing your cache?

Cache cleared, same issue.

TwisterMc commented 2 years ago

I'll try to push a fix to break the cache incase that's the issue. Or maybe just pushing new files will magically make it work.

ELMOKS214 commented 2 years ago

I'll try to push a fix to break the cache incase that's the issue. Or maybe just pushing new files will magically make it work.

Thanks, looking forward for that magic.

TwisterMc commented 2 years ago

New version is up. Hopefully it works better.

ELMOKS214 commented 2 years ago

New version is up. Hopefully it works better.

Updated the plugin, error still there.

thanks for looking this up.

TwisterMc commented 2 years ago

There's nothing that's encoding the URL in my code. Could one of your other editor plugins be causing an issue? Have you made any other updates/additions recently?

ELMOKS214 commented 2 years ago

I tried to disable the PDF embedder plugin. The cause is from multiple pdf plugins that I installed.

TwisterMc commented 2 years ago

So everything is working now?

ELMOKS214 commented 2 years ago

Still the same, even i uninstalled all the plugin related to PDF embedder or viewer.

TwisterMc commented 2 years ago

Ok, I'll push out an update to decode that URL. Not sure what's going on.

TwisterMc commented 2 years ago

I released a new version of the plugin, give it a shot.

ELMOKS214 commented 2 years ago

Its working, thats a relief, your a genius sir. thanks for the help and quick action.