Closed bitozoid closed 9 years ago
I can't reproduce this error. If you check the devel page cited above, you will find this:
DokuWiki passes the global $JSINFO to JavaScript
So there have to be two initial values: JSINFO[id] and JSINFO[namespace]
I just uploaded a revision to action.php which assigns false $JSINFO['updatable'] in case that was the source of your problem. Which browser are you using?
JSINFO is set for any dokuwiki page, but not for the 'snippets' window, because you don't get there via doku.php
. It is only defined in doku.php
and mediamanager.php
:
http://xref.dokuwiki.org/reference/dokuwiki/_variables/JSINFO.html
I have tried with chrome and firefox. In chrome, I just edit a page, click on the snippets button (it opens the snippets windows), right click wherever in the snippets window, Inspect Element and I can see the error in the console.
Well, I generally use firefox, but I just opened it in Chrome and inserted several snippets, both updatable and non-updatable and I don't see the error in the console. Apart from checking the console, does the plugin fail or does it work? Also what desktop platform are you on?
It does work. However, I added some code and realised about this error.
I remember. The point was that 'qs' did not get assigned properly and replacement in templates did not work.
First, as I mentioned above, I added a false value to $JSINFO[updatable] in action.php, in case that was the problem. As for the id value, that is set by Dokuwiki and should be available in the jQuery.ready function; it has nothing to do with opener
. If you enter alert(opener.JSINFO['id']) into the documenht ready function and check the console you will see that the value opener
is null.
In my case:
Thanks anyway.
I have to apologize for being a bit obtuse. But I believe the error is now corrected.
Never mind. Glad to help. :blush:
Where is the JSINFO variable set when loading exe/snippets.php? I see that tpl_metaheaders() writes its value, but it is not assigned anywhere. I get a javascript error when loading the popup window.
Looking at the source, JSINFO is set in doku.php, so it is not assigned when calling other php files. https://www.dokuwiki.org/devel:javascript?s[]=jsinfo#jsinfo
action.php
does assign JSINFO but it does not reachscript.js
.After some debugging, I see JSINFO set to null in the snippets popup.