Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
External Images and embedded maps no longer showing
Avatar
slackline #1
Member since Oct 2017 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: External Images and embedded maps no longer showing
Hi,

My site https://sheffieldboulder.uk/ uses the OpenLayersMap plugin to show the location of things and I embed images that I've hosted on Imgur to the site too.

Recently both stopped working in that neither are shown on the pages, I suspect the OpenLayersMap not working is related to the underlying image issue as the symbols I've used as pins on the map are displayed and these are hosted on the site, so its some related

For maps a table of the underlying points is rendered, whilst for images the filename appears with  "i.imgur.com_" preceeding it (if the image is a link that remains).

I've found a related thread...

after migrating from php 5.6 to 7.2 images don't show anymore - DokuWiki User Forum

I'm running PHP version 7.3.7 though and have tried placing a php.ini in the root of the wiki and /lib/exe as suggested and restarted both php-fpm and nginx but no joy.

Tried purging the cache as described under caching [DokuWiki] but again no joy.

I'm running this under ArchLinux on a VPS hosted by OVH if that is of any relevance.

If anyone has any ideas or suggestions I'm all ears as I'm stumped and would love to get the site back up and functioning properly.
Avatar
slackline #2
Member since Oct 2017 · 8 posts
Group memberships: Members
Show profile · Link to this post
I've partially worked around the image problem by simply uploading the images to the wiki itself so the images are now on the same server.

However, the OpenLayersMap plugin still doesn't render unfortunately and since this was an issue with images hosted outside the site I don't think its going to be something specific to the plugin.

Does anyone else use the plugin and have any ideas?
Avatar
schplurtz (Moderator) #3
Member since Nov 2009 · 452 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
It's a content security policy problem. (CSP); so most probably not related to PHP version. Please, also note that writting php.ini files at random places seldom solves problem.

Example on page https://sheffieldboulder.uk/doku.php?id=topos:howto . You get this in browser console :
Content Security Policy: Les paramètres de la page ont empêché le chargement d’une ressource à http://i.imgur.com/rqSgnl3.jpg (« default-src »). (French... but you get the idea : external resource is forbidden as per default-src CSP rule)

your current settings are (in the request answer header) :
content-security-policy: default-src 'self' always; frame-ancestors 'none';

I don't know how you can adjust that, though. I don't think this is a standard PHP setting (so no php.ini solution), and I'm certain this is not a DokuWiki setting. Do you by chance use the https://www.dokuwiki.org/plugin:cspheader plugin ? Does your hoster control panel has a CSP setting ? Did you blindly apply some advice and add an «header("content-security-policy: default-src 'self' always; frame-ancestors 'none';");» instruction to your inc/preload.php or conf/local.protected.php file ? Is this once again some archlinux weird^Wunsual default setting ?

Some technical articles on CSP (but your search engine will of course find hundreds more) :
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
https://www.projectseven.net/php-content-security-policy.php
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-07-23, 00:53:37 (UTC +02:00)