Giter Club home page Giter Club logo

Comments (5)

sander85 avatar sander85 commented on August 15, 2024

Not 100% sure but this change in syntax/indexmenu.php seems to fix it:

@@ -404,7 +404,7 @@
                 //insert node in last position
                 array_push($q, $i);
             }
-            $out .= $jscmd."('".idfilter($item['id'])."',$i,".$father.",'".$item['title']."'";
+            $out .= $jscmd."('".rawurldecode(idfilter($item['id']))."',$i,".$father.",'".$item['title']."'";
             //hns
             ($item['hns']) ? $out .= ",'".idfilter($item['hns'])."'" : $out .= ",0";
             ($item['type'] == 'd' || $item['type'] == 'l') ? $out .= ",1" : $out .= ",0";

from indexmenu.

Klap-in avatar Klap-in commented on August 15, 2024

Similar example from #52:

When page name selected contain non-english character it can't remember current tree state, but in the same sub-tree when only english character is used in page name it remember correctly! Any idea?

And here are my examples :

diary
diary:2013.10:2013.10.21_-_monday   (OK ✔)
diary:2013.10:2013.10.21_-_星期一   (Wrong ✘)
diary:2013.10:2013.10.21_-_월요일   (Wrong ✘)

Was reported at:
https://www.dokuwiki.org/plugin:indexmenu#js_does_not_remember_its_previous_state

from indexmenu.

samuelet avatar samuelet commented on August 15, 2024

I don't understand why it needs to be urlencoded when the idfilter func already takes care of doing this:
http://xref.dokuwiki.org/reference/dokuwiki/inc/common.php.source.html#l341

Any idea?
What's your version of dokuwiki and what's your webserver, iis or apache? Are you using dokuwiki url rewriting?

from indexmenu.

sander85 avatar sander85 commented on August 15, 2024

Ok, now looking at what idfilter() does my proposal was a bit stupid indeed. But I didn't want to encode it but decode.. JS probably doesn't match it when it's encoded and that's why it's not opening the tree.

So my new proposal would be this:

$out .= $jscmd."('".idfilter($item['id'])."',$i,".$father.",'".$item['title']."'";
=>
$out .= $jscmd."('".idfilter($item['id'], false)."',$i,".$father.",'".$item['title']."'";

Turning off encoding here fixes the problem for me.

I'm running the latest version of dokuwiki on Apache.

from indexmenu.

samuelet avatar samuelet commented on August 15, 2024

Sorry confusing the func, quick read = wrong read.
Does the patch work also with the nojs and #max (ajax stuff) options?

from indexmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.