Not logged in. · Lost password · Register
Forum: General Help and Support Syntax and Usage RSS
DOKU_URL is missing "doku.php"
Avatar
og #1
Member since May 2006 · 435 posts · Location: Bayern
Group memberships: Members
Show profile · Link to this post
Subject: DOKU_URL is missing "doku.php"
After debugging the shortcutkey plugin i found that the environment variable "DOKU_URL" does not contain the index-page "doku.php".

Well, i could add it statically, but i don't think it is a good idea because there may be setups where this is hidden or something different. Or is it usual to concat ["DOKU_URL"] with "doku.php" ?
Oli...
Avatar
Michaelsy #2
Member since Jun 2015 · 922 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
Why do you think that's a problem? Do you have a malfunction or an error message? I do not want to claim that I know my way around. But when I look at the use of DOKU_URL, it does not look as if doku.php should be part of it: https://codesearch.dokuwiki.org/search?project=dokuwiki&…

Or did I misunderstand you?
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
Avatar
og #3
Member since May 2006 · 435 posts · Location: Bayern
Group memberships: Members
Show profile · Link to this post
No, you get me right! I also don't get that it would be part of. The question therefore was if it is usual to include it yourself?

And yes, i have encountered a problem in using the "shortcutkeys" plugin. The JS in the plugin builds an URL from concating DOKU_URL and "?id=....".
Oli...
Avatar
Michaelsy #4
Member since Jun 2015 · 922 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
See: https://www.dokuwiki.org/devel:environment#doku_url

The Shortcut Plugin is obviously outdated. (You mean the Shortcut Plugin?) No, you mean the Shortcutkey Plugin.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
This post was edited 2 times, last on 2018-12-18, 14:21 by Michaelsy.
Avatar
og #5
Member since May 2006 · 435 posts · Location: Bayern
Group memberships: Members
Show profile · Link to this post
No, i really mean the current shortcutkey plugin: https://www.dokuwiki.org/plugin:shortcutkey

As you can see in the source here: https://github.com/dryoo/dokuwiki-plugin-shortcutkey/blob/…
it uses this syntax to generate an URL to jump to:
var uurl=JSINFO['DOKU_URL'] + "?id=" +JSINFO['id'];
and this will result in an URL like "https://my.wiki.de/?id=nice:namespace:page" which will lead to the home instead of the desired page.

If one uses URL-Rewriting to eliminate the need of "doku.php" in the URL, the plugin works like expected.
Oli...
This post was edited on 2018-12-18, 14:22 by og.
Avatar
Michaelsy #6
Member since Jun 2015 · 922 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
You are not the first one with this issue: https://github.com/dryoo/dokuwiki-plugin-shortcutkey/issue…

If one uses URL-Rewriting to eliminate the need of "doku.php" in the URL, the plugin works like expected.

The demo page for the plugin (http://openwiki.kr/tech/shortcutkey) uses URL rewriting.

Well, i could add it statically, but i don't think it is a good idea because there may be setups where this is hidden or something different. Or is it usual to concat ["DOKU_URL"] with "doku.php" ?

I think by the above given link to the specification of DOKU_URL your question should have answered.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
This post was edited 2 times, last on 2018-12-18, 14:42 by Michaelsy.
Avatar
turnermm (Moderator) #7
Member since Oct 2009 · 4642 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In reply to post #3
DOKU_URL is designed to be used as the root entry point into the wiki and to be combined with other paths at the internals level, for instance when creating plugins.  Appending doku.php would break this functionality.  But it should still work with id=page.
    http://my_domain/my_wiki/id=wiki:page
For instance, try this:
    https://mturner.org/devel/?id=wiki:welcome
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
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-06-17, 03:33:13 (UTC +02:00)