-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File origin does not match the viewer's #6
Comments
Do you have a URL I could look at? Are you using a VPN? If so, that might be causing the issue. |
My site is not live yet as we are still in final stages of setting it up. If you want me to put it live for a few minutes (while we are on a call together) so you see the issue then please let me know the time that suits you and what number I should call you on.
I am not using a VPN as these are illegal in China (as we are setting up a China company that will depend on Ministry approval for our on line activities I want to ensure full compliance with all local laws.)
Julian
From: Thomas McMahon <[email protected]>
Sent: 04 August 2020 09:46
To: TwisterMc/pdfjs-viewer-shortcode <[email protected]>
Cc: JulianElwood <[email protected]>; Author <[email protected]>
Subject: Re: [TwisterMc/pdfjs-viewer-shortcode] File origin does not match the viewer's (#6)
Do you have a URL I could look at?
Are you using a VPN? If so, that might be causing the issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FTwisterMc%2Fpdfjs-viewer-shortcode%2Fissues%2F6%23issuecomment-668329616&data=02%7C01%7C%7C1d73c16c68694f72b8e508d838181ce6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637321023496625100&sdata=h1393r68OlnZYhvgMDPrkAzNQoEQ3AB%2Fl8JZiVPwci8%3D&reserved=0>, or unsubscribe<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMZBHTAFZ7BJ2IXGBOMIZV3R65R4XANCNFSM4PT365JQ&data=02%7C01%7C%7C1d73c16c68694f72b8e508d838181ce6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637321023496635098&sdata=w4riPu32jJ8W1Et8NIgyfxeUr6uRMjmAeI1nPhiuN4g%3D&reserved=0>.
|
Sorry. I didn't mean VPN, I meant CDN. 🤦♂️ The PDF has to load from the same URL as the the site is loading from. If the PDF is offloaded to a CDN, then the URLs won't match. |
If you add a PDF to a page, and have the 'Fullscreen' link enabled, can you view the post, hit the 'Fullscreen' link and then paste that link here? It doesn't need to be accessible to me, but I want to see what it looks like. Example: |
Hi,
I also have a Chinese site and was testing pdf plugs for that. I could not get PDFjs Viewer with the wordpress version on the Aliyun server and tried another plug in which worked ok (but did not work when I tried it on my international site hosted by Godaddy).
Could be there is some strange error using your plug in that is to do with my location (but I’m not sure as people in UK have tested my site and also get the error!)
Regards,
Julian
From: Thomas McMahon <[email protected]>
Sent: 05 August 2020 10:06
To: TwisterMc/pdfjs-viewer-shortcode <[email protected]>
Cc: JulianElwood <[email protected]>; Author <[email protected]>
Subject: Re: [TwisterMc/pdfjs-viewer-shortcode] File origin does not match the viewer's (#6)
If you add a PDF to a page, and have the 'Fullscreen' link enabled, can you view the post, hit the 'Fullscreen' link and then paste that link here? It doesn't need to be accessible to me, but I want to see what it looks like.
Example:
https://olaf.local/wp-content/plugins/pdfjs-viewer-shortcode/pdfjs/web/viewer.php?file=https%3A%2F%2Folaf.local%2Fwp-content%2Fuploads%2F2020%2F03%2F7700.pdf&dButton=true&pButton=true&oButton=false&v=1.5.1#zoom=auto
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FTwisterMc%2Fpdfjs-viewer-shortcode%2Fissues%2F6%23issuecomment-668931569&data=02%7C01%7C%7C6752d2748ece4de7b50e08d838e425ac%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637321899811554556&sdata=sTQzN7Ip6RRCrOM41SbOxkG2k4CuhivQHTqAUJmmNVU%3D&reserved=0>, or unsubscribe<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMZBHTGT4VTSVCDBH6GOFG3R7C5BZANCNFSM4PT365JQ&data=02%7C01%7C%7C6752d2748ece4de7b50e08d838e425ac%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637321899811564554&sdata=vyO4an577%2BUUQzthRpuJLiFdwRKeeiilRgqVcAwfeq8%3D&reserved=0>.
|
Can either of you provide me the link the Fullscreen link is going to? |
As pointed out in the screenshot, it's reporting to different domains. It could be because it's on a staging site and the uploads are still pointing to production, or it could be that something is configured differently, but the plugin and media domain is different. They may technically be the same domain, but they have different addresses. |
Try the latest version and see if that helps any. |
Using Version: 1.5.7 (as in PlugIn library)/v2.3.200 on WordPress version 5.6 and having the same problem. the two pdf files I am trying to display or download are IN my media library, not linked to it. I'm using a more current version than JulianE above. BUT, i AM on a staging site. Thing is, the urls of the media library items have the staging site location incorporated into them. What do i do? |
Do you have a URL? This issue happens when the PDF is coming from a URL that is not the same as the URL that is showing the PDF. |
Hi there @TwisterMc, I had the same issue, but I fixed it by adding a list of CDN links to var HOSTED_VIEWER_ORIGINS within the viewer.js file. But for some reason, this hack does not work with the 1.5.9 version of the plugin. Would you mind updating the repo to see what's changed in the plugin and could be causing this? Thanks! |
I get this error with any pdf I try to display.
I have media settings option to store media by year and date switched on - Is this causing the error with loading the pdf?
Only threads I see on the web seem to imply I either need to:
Set HOSTED_VIEWER_ORIGINS_OPTIONS - I don't know where to set this or what format is needed
Comment out code for this message - I feel this is unsafe and I don't want to change plug in code in any way
Please help resolve this for me
The text was updated successfully, but these errors were encountered: