Search code examples
helpndoc

HelpNDoc online help not showing correct buttons and correct contents functionality


When I visit this URL using Firefox on my PC:

http://help-msa.publictalksoftware.co.uk/msa-options-calendars.html

Firefox

Yet, I have exactly the same site temporarily here:

http://help.trucklesoft.co.uk/msa-options-calendars.html

Firefox

It renders correctly. The buttons have the right symbols and the contents is fully working.

The former link appears to show the buttons correct on a iPad with Safari but the contents is not functional.

My code is exactly the same on both sites. Why is it not working on the former?

The code is developed my HelpNDoc.

Chrome Console

When I look at the page with Chrome in the console it states:

Access to Font at 'https://help-msa.publictalksoftware.co.uk/vendors/bootstrap-3.3.6/fonts/glyphicons-halflings-regular.woff2' from origin 'http://help-msa.publictalksoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://help-msa.publictalksoftware.co.uk' is therefore not allowed access.

Huh? Is this related?

Firefox Console

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://help-msa.publictalksoftware.co.uk/vendors/bootstrap-3.3.6/fonts/glyphicons-halflings-regular.ttf. (Reason: CORS header 'Access-Control-Allow-Origin' missing).


Update

I think I worked it out. My www.publictalks.co.uk site is using the https protocol. If you go to the site using http You get redirected.

If I adjust the above link to:

https://help-msa.publictalksoftware.co.uk/msa-options-calendars.html

It is fine:

using https

For some reason this subdomain help-msa is not redirecting to https site.

I did the above tests on my iPad and iPhone. I now need to check my PC.


Solution

  • The issue here was that my site is using https and I was using links that were http prefixed.

    I assumed that sub-domains would redirect like the rest of the site but they don't. So the resolution is to redirect sub-domains to https.

    This can be done in HTACCESS:

    #Rewrite everything to https
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    

    But in my case I have the Wordpress Really Simple SSL Pro plugin (purchased) so I have asked them if they can support external sub-domains via a setting.