Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


PDF not appearing on item page in Slides

andy graybeal
on 11/17/15, 9:45 AM 825 views

My PDF shows up on front of the Public Slides, and in the Menu for the public slides.  It doesn't show up when I'm on the page for the actual PDF though.

It's fine here: https://nixtamalized.com/slides

and it's fine here: https://nixtamalized.com/slides/public-channel-1

but not here: https://nixtamalized.com/slides/slide/knivesandchives-llc-receipt-1

How do I fix this?

Thank you!


Ermin Trevisan

--Ermin Trevisan--
| 6 3 7
Walchwil, Switzerland
--Ermin Trevisan--

Ermin Trevisan
On 11/20/15, 8:36 AM


It looks like you have the same problem I do (see https://www.odoo.com/de_DE/forum/hilfe-1/question/8-0-website-slides-uploading-a-presentation-keeps-loading-forever-93332).

If you look into your console in the browser's development tools you see the following:

Blocked loading mixed active content "http://www.twanda.ch/slides/embed/6?page=1"[Learn More]

This is because the PDF is loaded from a http link instead of an https link. So far I have no idea how to correct this. My system parameter web.base.url is properly set to https.


In the configuration of your virtual host on your proxy server the following parameter must be set:

(Apache version)

RequestHeader set "X-Forwarded-Proto" "https" 

See examples here:


Thank you for the response! I will look at my browsers dev console.

andy graybeal
on 11/20/15, 9:13 AM

Okay. Chrome says this: knivesandchives-llc-receipt-1:414 Mixed Content: The page at 'https://nixtamalized.com/slides/slide/knivesandchives-llc-receipt-1' was loaded over HTTPS, but requested an insecure resource 'http://nixtamalized.com/slides/embed/1?page=1'. This request has been blocked; the content must be served over HTTPS. Firefox says this: Blocked loading mixed active content "http://nixtamalized.com/slides/embed/1?page=1"[Learn More]

andy graybeal
on 11/20/15, 9:20 AM

Ermin, Where do I find the system parameter website.url ? I bet I haven't set it to https. Is it under "Website Admin" -> "Configuration" -> "Website name" ? I have this set to "nixtamalized.com", and neither http or https

andy graybeal
on 11/20/15, 9:57 AM

I found a setting under "General Settings" with "Website" and it was configured "http://nixtamalized.com" so i changed that to https

andy graybeal
on 11/20/15, 10:03 AM

But, in my case at least, it does not help...(I have deleted the PDF and uploaded it anew).

Ermin Trevisan
on 11/20/15, 10:11 AM

I get a new error: UnexpectedResponseException: Unexpected server response (301) while retrieving PDF "https://www.twanda.ch/slides/slide/7/pdf_content"

Ermin Trevisan
on 11/20/15, 10:12 AM

that didn't change anything. i uploaded a new pdf and that didn't work. PNG's appear to be working though! I can make my PDFs into PNGs for now.

andy graybeal
on 11/20/15, 10:13 AM

Under "Website Admin" -> "Slides - Channels" -> "Public Channel" -> each message that logs what i've done in this Slide Channel has http and not https for the item.

andy graybeal
on 11/20/15, 10:23 AM

I'm still trying to find a way, but I suppose it is a bug, in version 9.0 it works flawlessly. It is also not possible to create a slide in the backend, this results in a 500 server error :-(

Ermin Trevisan
on 11/20/15, 10:37 AM

I'm on version 9 :(

andy graybeal
on 11/20/15, 10:59 AM

Where exactly is the system parameter website.url ?

andy graybeal
on 11/20/15, 11:00 AM

Well, you are right, in my case it only works for 9.0 because it is a test server, which is not yet SSL secured. You can find the parameter web.base.url under Settings/Technical/Parameters/System Parameters. You need to activate the developer mode in order to access these settings.

Ermin Trevisan
on 11/21/15, 3:43 AM

Maybe this could point to a solution: https://github.com/mozilla/pdf.js/issues/6446

Ermin Trevisan
on 11/21/15, 3:58 AM

Ermin, You are the best!! That fixed it right up. Changing web.base.url to be https!!

andy graybeal
on 11/21/15, 2:02 PM

My nginx configuration already has that setting in it -- here it reads in nginx: location / { proxy_pass http://openerp; # force timeouts if the backend dies proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; # set headers proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; }

andy graybeal
on 11/22/15, 6:13 PM

Your site still tries to load from http:// instead of https://. So I assume that something in your proxy conf does not work properly. Try to check with other nginx configurations on the internet. I have Apache and after the change in my virtual hosts configuration, a restart of Apache and a reload of the website it worked immediately and all contents are now loading from https://.

Ermin Trevisan
on 11/23/15, 3:03 AM

I don't know how it could make a difference, if any, but I have dbfilter activated in my odoo-server.conf and installed the module https://www.odoo.com/apps/modules/8.0/dbfilter_from_header/

Ermin Trevisan
on 11/23/15, 3:13 AM

Andy, just a stupid question (but I had a conversation with somebody, who had this problem): have you set "proxy_mode = True" in your Odoo config file?

Ermin Trevisan
on 11/26/15, 2:12 AM
Lucas Huber
On 7/25/16, 9:28 AM

Solution for NGINX:

    location / {      
    proxy_pass http://moneygrid-net;       
    # force timeouts if the backend dies     
     proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
     proxy_redirect off;
     # set headers
     proxy_set_header Host $host;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-Host $host;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header X-Forwarded-Proto $scheme;


andy graybeal
On 11/21/15, 2:16 PM

well, i spoke to soon.. it is acting differently.  it shows the PDF on the item page now.  It also still throws a warning about Mixed Content and how it still wants to show an http bound file.

I also have a display widget showing that it is "loading".. i'm assuming indefinetly because it is still "loading" after some time.

When I click on the "full screen" button, it only shows me what is in the item preview display, not the whole document.

hmm i didn't mean to post like this.

Chrome's error message is now: Mixed Content: The page at 'https://nixtamalized.com/slides/embed/6?page=1' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://nixtamalized.com/slides/slide/ein-number-6/pdf_content'. This request has been blocked; the content must be served over HTTPS. 6:1 Uncaught (in promise) UnexpectedResponseException {name: "UnexpectedResponseException", message: "Unexpected server response (0) while retrieving PD…s://nixtamalized.com/slides/slide/6/pdf_content".", status: 0}

andy graybeal
on 11/21/15, 2:19 PM

Andy, see my last comment, it seems to be a CORS (Cross Origin Ressource Sharing) issue. Besides the link I have already posted in this comment, this one should be helpful also: https://awesometoast.com/cors/ But I was not successful so far...

Ermin Trevisan
on 11/22/15, 4:21 AM

I GOT THE SOLUTION!!!! Forget about CORS. You need to set the RequestHeader set "X-Forwarded-Proto" "https" in your virtual host conf in your proxy server, see the following sample for Apache: https://www.odoo.com/de_DE/groups/community-59/community-13327850?mode=thread

Ermin Trevisan
on 11/22/15, 5:01 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 11/17/15, 9:45 AM
Seen: 825 times
Last updated: 7/25/16, 9:28 AM