Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
Logo not showing, image upload broken, wild underscore in URLS
Avatar
Maffu #1
Member for 3 months · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Logo not showing, image upload broken, wild underscore in URLS
Hi all,
My logo has suddenly disappeared from my wiki.
In its place I get a broken image placeholder and the alt text from the image (i.e. the site name).
In trying to get it back I discovered two things, that seem to be related.

  • The source code shows as
    1. <img src="/_media/wiki/logo.png" alt="Knowledge Base" class="pull-left dw-logo-tagline" id="dw__logo" height="32" style="margin-top:-5px" />
    However the folder /_media doesn't exist, and if I create it and populate it with the required files the image is still broken

  • Following the suggested method of changing the logo using the media manager, I noticed that all of the images in the media manager were showing as broken - even when I uploaded something directly into the folder.  I checked that the folders and files were accessible (permissions 777) and they were, but not from the browser.

On further inspection I found the code that appears to be creating the link on line 633 of common.php:
  1.     // decide on scriptname
  2.     if($direct) {
  3.         if($conf['userewrite'] == 1) {
  4.             $script = '_media';
  5.         } else {
  6.             $script = 'lib/exe/fetch.php';
  7.         }
  8.     } else {
  9.         if($conf['userewrite'] == 1) {
  10.             $script = '_detail';
  11.         } else {
  12.             $script = 'lib/exe/detail.php';
  13.         }
  14.     }
When I changed the line
  1. $script = '_media';
to
  1. $script = 'media';
it changed the link, but didn't bring back my logo.
I am using the latest version of Dokuwiki and the Bootstrap3 template.
Can anyone shed any light on this?
This post was edited on 2019-08-21, 17:37 by Maffu.
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4724 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
There is no folder named "media"; it is a regular expression placeholder for a call to "lib/fetch.exe. . .".  It is used for for the .htaccess level of nice urls. So, "_media" as a directory is never accessed.  So, first, refresh your browser cache and delete all the directories in data/.cache.  

If that doesn't help, disable nice urls and see if the logo appears.  If not, then revert to the dokuwiki template.  If the logo appears then there is some glitch in bootstrap3 or else bootstrap3 has a requirement that you haven't met.   Typically, the logo should be in either the templates images directory or the media directory.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
Maffu #3
Member for 3 months · 5 posts
Group memberships: Members
Show profile · Link to this post
Hi Myron,
Thanks for replying.
The thing is that is has, up until now, been displaying fine.
I'll try those suggestions and get back to you.
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4724 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Afraid I didn't read your post carefully enough, and didn't take into consideration the fact that this is not just a logo problem but media problem generally.  Still, I would first try refreshing the cache in both browser and your dokuwiki.  And then I would try disabling nice urls, on the chance that the configuration for nice  urls has been corrupted.  And also I would try reverting to the dokuwiki template, to see if it is something in the bootstrap3 template that is causing the problem. 

Have you recently in any way made changes to your dokuwiki, either with a new plugin or by updating a plugin?  And have you in any way made changes to the dokuwiki code?
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
Maffu #5
Member for 3 months · 5 posts
Group memberships: Members
Show profile · Link to this post
After much hair pulling, the fix for this was to remove a space from the beginning of inc/local.protected.php (before the <?php tag

I have no idea why a space was there, but I found it by running findbad.php and as soon as I deleted the space my images came back.
This post was edited on 2019-09-26, 10:52 by Maffu.
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-11-18, 18:58:53 (UTC +01:00)