Closed dwp-forge closed 9 years ago
> Where does refnotes store its preferences? Is there some file or directory that should
be 777?
The settings are supposed to be saved in the plugin directory dokuwiki/lib/plugins/refnotes
in *.local.dat files. The directory doesn't have to be 777 but write access for http
server wouldn't harm.
From the bug report it seems that you are quite literate in software internals. There
are two places in admin.js where this warning is generated (look for saving_failed):
failure to send an AJAX request and invalid response from the server. Maybe with some
alert() calls you could figure out which one is triggered. That would be a start.
Original issue reported on code.google.com by dwp-forge
on 2010-09-20 17:09:51
Hi
I'm actually having the same problem as issues 20, 18 and 17 ; )
No way to load configuration files (.local.dat), no way to save them correctly (the
size of namespace.local.dat is 6 bytes).
I checked with an alert() in the file admin.js and it looks like it comes from the
ajax request.
Sorry for my bad english, and thanks for your help.
Original issue reported on code.google.com by gabriel.daudin
on 2011-03-04 15:20:15
> the size of namespace.local.dat is 6 bytes
And what are those 6 bytes? Anything readable? Isn't it 'a:0:{}' by chance?
Did you try to modify some settings? Could you for the sake of experiment delete all
*.local.dat files, go to the configuration page and save the settings without modifying
them?
> it looks like it comes from the ajax request
From which function? onSaved or saveSettings?
Original issue reported on code.google.com by dwp-forge
on 2011-03-04 15:38:10
>And what are those 6 bytes? Anything readable? Isn't it 'a:0:{}' by chance?
yes, this is an empty arry "a:0{}"
>Did you try to modify some settings? Could you for the sake of experiment delete all
*.local.dat files, go to the configuration page and save the settings without modifying
them?
I tried copying, renaming, deleting about 10 time. Always the same...
>From which function? onSaved or saveSettings?
the function is onSaved()
Original issue reported on code.google.com by gabriel.daudin
on 2011-03-04 15:41:27
Just adding something :
i can't set new configuration when using the configuration page. Hard to say it in
english, but imagine that no button react, except the "save" button.
Original issue reported on code.google.com by gabriel.daudin
on 2011-03-04 15:43:42
> no button react, except the "save" button.
I guess I can reproduce this by disabling server.loadSettings() call.
Could you put some alert() calls into loadSettings() and onLoaded() to see where they
go wrong?
Original issue reported on code.google.com by dwp-forge
on 2011-03-04 16:25:51
The problem is in the function onLoaded(), at line
-> var settings = JSON.parse(ajax.response);
Original issue reported on code.google.com by gabriel.daudin
on 2011-03-04 16:48:00
That's weird : i went into the json2.js file and added some alert() into the function
json.parse. But no one appeared.
It looks like JSON object already exists, no ?
Original issue reported on code.google.com by gabriel.daudin
on 2011-03-04 16:56:43
Okay, i found the problem :
I made an alert(ajax.response") just before the line "var settings = JSON.parse(ajax.response);"
in the function onLoaded()
i got this :
-------------------------
{"cookie":"{B27067E9-3DDA-4E31-9768-E66F23D18F4A}","general":{"replace-footnotes":false,"reference-db-enable":false,"reference-db-namespace":":refnotes:"},"namespaces":[],"notes":[]}
<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php"
alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
-----------------------------------------
It looks like my webhost added some code :p
i'm using webhost.com.
I deleted the "bad" text and launched successfully the script...
i think i can't disable this text. Maybe could you add a function which disable this
?
Hope this will help
Original issue reported on code.google.com by gabriel.daudin
on 2011-03-04 17:15:08
Could it be that you use some other plugin that includes another JSON instance?
You could try to rename JSON to something unique (say, JSONrn) in both admin.js and
json2.js and see what happens.
Original issue reported on code.google.com by dwp-forge
on 2011-03-04 17:16:46
> Okay, i found the problem
Great!
> It looks like my webhost added some code
It still doesn't explain why alert in json.parse didn't fire.
> Maybe could you add a function which disable this?
I'll try.
Original issue reported on code.google.com by dwp-forge
on 2011-03-04 17:40:15
Could you try this patch?
Original issue reported on code.google.com by dwp-forge
on 2011-03-04 18:42:11
How do you use a ".patch" file ?
Original issue reported on code.google.com by gabriel.daudin
on 2011-03-07 08:03:50
Sorry, I got an impression that you would know.
http://en.wikipedia.org/wiki/Patch_(computing)
http://en.wikipedia.org/wiki/Patch_(Unix)
Anyway, that patch was unnecessary complex. See the attachment.
Original issue reported on code.google.com by dwp-forge
on 2011-03-07 08:31:49
This is working fine :)
I see a print() in action.php, am i supposed to tell you what it says ? Where is it
printed ?
Original issue reported on code.google.com by gabriel.daudin
on 2011-03-07 08:43:50
This print() writes that message, which you receive in onLoaded() on JS side. You already
told me what it says using that alert(ajax.response) you did :)
Original issue reported on code.google.com by dwp-forge
on 2011-03-07 09:07:40
Okay, so I'll guess you do not need me anymore ?
Thanks for your help and reactivity : )
Original issue reported on code.google.com by gabriel.daudin
on 2011-03-07 09:11:31
Yep, I guess we fixed this one. Thanks for your help :)
Original issue reported on code.google.com by dwp-forge
on 2011-03-07 09:17:26
There was no follow-up for original issue, so let's assume it's a non-issue.
The issue with webhost JSON corruption is fixed in revision 401.
Original issue reported on code.google.com by dwp-forge
on 2011-03-14 14:21:36
Original issue reported on code.google.com by
edwin.dertien
on 2010-09-20 13:45:46