Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexmenu tree items add "%3" to the start of names #68

Closed
chang-zhao opened this issue Mar 19, 2014 · 3 comments
Closed

Indexmenu tree items add "%3" to the start of names #68

chang-zhao opened this issue Mar 19, 2014 · 3 comments
Labels

Comments

@chang-zhao
Copy link
Contributor

Fresh last version installed on (micro)Apache. Bug is:

In the tree view, when I click any page name there, it gives URL with %3 prepended, such as:

http://localhost:8800/%3playground%3Bplayground

(However in the Content Preview of pagenames in the tree there are correct links, without these %3).

I have set rewrite with .htaccess

  • which is usual uncommented .htaccess.dist from DokuWiki distrib (see below).
  • I also had to add to my server/conf/httpd.conf:
<directory "./../dokuwiki">
AllowOverride All
</directory>
  • Wiki config:
useslash = false
fnencode = safe

(but when I switched to "fnencode = url", the bug was the same).

By the way, namespace separator appears to be ";" not ":", I don't know why.

Before this bug appeared, I set "start" page first header to non-latin characters:
==== Тест ​====

But when I changed them to latin characters:
==== Test ​====

and cleared the cache, the bug persisted, so I don't know if it's related.

== Here is my .htaccess:

# Enable this to restrict editing to logged in users only

# You should disable Indexes and MultiViews either here or in the
# global config. Symlinks maybe needed for URL rewriting.
Options -Indexes -MultiViews +FollowSymLinks

# make sure nobody gets the htaccess, README, COPYING or VERSION files
<Files ~ "^([\._]ht|README$|VERSION$|COPYING$)">
    Order allow,deny
    Deny from all
</Files>

# Uncomment these rules if you want to have nice URLs using
# $conf['userewrite'] = 1 - not needed for rewrite mode 2
RewriteEngine on

RewriteRule ^_media/(.*)              lib/exe/fetch.php?media=$1  [QSA,L]
RewriteRule ^_detail/(.*)             lib/exe/detail.php?media=$1  [QSA,L]
RewriteRule ^_export/([^/]+)/(.*)     doku.php?do=export_$1&id=$2  [QSA,L]
RewriteRule ^$                        doku.php  [L]
RewriteCond %{REQUEST_FILENAME}       !-f
RewriteCond %{REQUEST_FILENAME}       !-d
RewriteRule (.*)                      doku.php?id=$1  [QSA,L]
RewriteRule ^index.php$               doku.php

# Not all installations will require the following line.  If you do,
# change "/dokuwiki" to the path to your dokuwiki directory relative
# to your document root.
#RewriteBase /dokuwiki
RewriteBase /

# If you enable DokuWikis XML-RPC interface, you should consider to
# restrict access to it over HTTPS only! Uncomment the following two
# rules if your server setup allows HTTPS.
#RewriteCond %{HTTPS} !=on
#RewriteRule ^lib/exe/xmlrpc.php$      https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]

indexmenu_bug_4a

@chang-zhao
Copy link
Contributor Author

With "useslash = true" this bug doesn't appear.

@dturkalj
Copy link
Contributor

I notice the same problem. I have main site on IIS7 where everything works ok.
And I have copy of site on my PC where I running micro Apache for off-line copy, where problem exist.

It only affects java script type of indexmenu where %3 is shown at beginning of namespace in link, and only when semicolon is used as namespace separator.
Non-java script indexmenu show links correctly.

I make change in DokWiki inc/common.php and add in "function idfilter($id, $ue = true)" :

    $id = str_replace('%3B', ';', $id); //keep as semicolon

like @borekb did in "Fixed page ID for IIS 7 (no semicolon necessary)" (look link above).
and problem disapear !

It looks that somewhere in code leading namespace separator is removed, but when safe form '%3B' is used instead of ';' character it removes only one letter ('B') instead of all three characters leaving link unusable.

@Klap-in
Copy link
Collaborator

Klap-in commented Jul 18, 2014

That is is proposed and is merged with dokuwiki/dokuwiki#801 just some hours ago.

So in the next release of DokuWiki this issue is solved!

@Klap-in Klap-in closed this as completed Jul 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants