FIX: deleting tiddlers in 1.8.5 and 1.9_minimal

10 views
Skip to first unread message

Kashgarinn

unread,
Aug 23, 2010, 8:50:32 AM8/23/10
to ccTiddly
Hi there.

I had a problem deleting tiddlers from within the CCTW, finally found
out what was wrong.

in 1.8.5.:
edit C:\xampp\htdocs\itwiki\tiddlers\importedPlugins
\ServerSideSavingPlugin.js
- line 91 change to :
- var req = adaptor.deleteTiddler(tiddler.title, context, {},
this.removeTiddlerCallback);

in 1.9_minimal:
C:\xampp\htdocs\tmswiki\plugins\ccTiddlyCore\files\importedPlugins
\ServerSideSavingPlugin.tid
- line 112 change to :
- var req = adaptor.deleteTiddler(tiddler.title, context, {},
this.removeTiddlerCallback);

it's the same problem, so the same fix works.

K.

whatever

unread,
Sep 1, 2010, 2:59:04 AM9/1/10
to ccTiddly
It doesn't work for me. I mean, with and without this change, I can
delete the tiddlers, it just doens't save the change in the database.
I need to open another tiddler and close it with Done, which then
automatically saves the changes.

w

Kashgarinn

unread,
Sep 1, 2010, 6:31:41 AM9/1/10
to ccTiddly
Firebug is an addon for firefox, you can also use chrome and the
developer tools.

Check the "net" panel in firebug, see what you get as a response when
you click the delete button, it should be something like:
Array
(
[workspace] => wiki
[title] => 1 September 2010
)
gello

- what the "gello" is doing there, I have no idea..

K.

whatever

unread,
Sep 29, 2010, 4:54:38 AM9/29/10
to ccTiddly
Hi!
I tried checking with Firebug, but I get nothing, all subpanels on the
Net panel are blank. My server is on localhost, by the way.
w

Kashgarinn

unread,
Sep 29, 2010, 6:36:43 AM9/29/10
to ccTiddly
You should get a command in the net panel if you try and delete a
tiddler, if you refresh the wiki, or if you try and import something,
i.e. every interaction from the server.

Try and get that working so you see the post/get commands. You can
try chrome's developer tools, but I don't remember what the net panel
equivalent is called.

S.

whatever

unread,
Sep 29, 2010, 6:55:50 AM9/29/10
to ccTiddly
Finally figured out why I got nothing. :D It was automatically
switching me to IE Tab. I checked and i get your result. I did notice
what the problem is (at least I think that's the problem), but I'm not
sure how to fix it. The difference is in the URL:
Create tiddler: http://localhost/cctiddly190/handle/save.php
Delete tiddler: http://localhost/cctiddly190//handle/delete.php
Open tiddler and save by clicking on Done: http://localhost/cctiddly190/handle/delete.php
AND http://localhost/cctiddly190/handle/save.php

As you can see, the delete.php upon deletion has two slashes in the
URL. Otherwise, all other data is identical.
Any ideas?
w

Kashgarinn

unread,
Sep 30, 2010, 7:35:04 PM9/30/10
to ccTiddly
Hehe, knew that would help :)

Better start digging through the code to see where the extra / is
being inserted. Check the serversidesavingplugin.js I reference
above, a good chance somewhere there the problem lies.

S.

whatever

unread,
Oct 1, 2010, 5:55:31 AM10/1/10
to ccTiddly
Hi!
I looked into that file, as well as c:\xampp\htdocs\cctiddly190\plugins
\ccTiddlyCore\files\plugins\001_ccTiddlyAdaptor.js which refers to
delete.php, but my JavaScript knowledge isn't sufficient to determine
the cause. At first, I thought that the reason was the line with /
delete.php in 001_ccTiddlyAdaptor.js, but I checked the server.host
field and it doesn't have the slash at the end. Just in case, I tried
removing the slash in 001_ccTiddlyAdaptor.js, but then I just got an
error, since the path wasn't correct anymore.
I tried the Firebug again and discovered an interesting thing. I
created and then deleted the tiddler named Test.
This was the result upon deletion (http://localhost/cctiddly190//
handle/delete.php):
Array
(
[workspace] =>
[title] => Test
)
gello

This was the result upon open and done of another tiddler (http://
localhost/cctiddly190/handle/delete.php AND http://localhost/cctiddly190/handle/save.php):
Array
(
[workspace] =>
[title] => [object Object]
)
gello

Any ideas?
w

whatever

unread,
Oct 1, 2010, 6:12:13 AM10/1/10
to ccTiddly
Also, I just noticed on the Console tab the following error right
after http://localhost/cctiddly190//handle/delete.php:
A script from "http://localhost" was denied UniversalXPConnect
privileges.
};
cctiddly190 (line 19451)
The error appeared twice, but, strangely, only the first time I
created and then deleted the Test tiddler. I marked the Break on this
error, but I couldn't reproduce the error.
w

On Oct 1, 11:55 am, whatever <kbrezov...@gmail.com> wrote:
> Hi!
> I looked into that file, as well as c:\xampp\htdocs\cctiddly190\plugins
> \ccTiddlyCore\files\plugins\001_ccTiddlyAdaptor.js which refers to
> delete.php, but my JavaScript knowledge isn't sufficient to determine
> the cause. At first, I thought that the reason was the line with /
> delete.php in 001_ccTiddlyAdaptor.js, but I checked the server.host
> field and it doesn't have the slash at the end. Just in case, I tried
> removing the slash in 001_ccTiddlyAdaptor.js, but then I just got an
> error, since the path wasn't correct anymore.
> I tried the Firebug again and discovered an interesting thing. I
> created and then deleted the tiddler named Test.
> This was the result upon deletion (http://localhost/cctiddly190//
> handle/delete.php):
> Array
> (
>     [workspace] =>
>     [title] => Test
> )
> gello
>
> This was the result upon open and done of another tiddler (http://
> localhost/cctiddly190/handle/delete.php ANDhttp://localhost/cctiddly190/handle/save.php):
Reply all
Reply to author
Forward
0 new messages