Page 1 of 1

Delete Entries Bug - Maybe...

Posted: Wed Nov 24, 2004 11:54 pm
by amontero
I've just spent some time getting the mail2s9y script working with serendipity 0.7 (the new category structure broke it). I got it working now if anybody is interested. However, I was sending myself a bunch of test emails to make sure everything was working. After I got it working satisfactorily, I used the Blog Administration to delete all of the test entries I sent myself. Just to doublecheck, I took a look in the tables and found it wasn't deleting rows in serendipity_entrycat belonging to the entry getting deleted. I took a look in serendipity_functions.inc.php and the section that deletes comments and references (line 2726) does not delete category associations. Is this by design? Does it get handled in a different function? I'll be first to admit I don't know the s9y api like the back of my hand. Let me know if this is a bug or if I still need to tinker with the mail2s9y script so that s9y will delete the category associations automatically. THANKS!

Re: Delete Entries Bug - Maybe...

Posted: Thu Nov 25, 2004 1:38 pm
by garvinhicking
Hi!

Thanks a lot for letting me know; and yes, the function serendipity_deleteEntry() was missing those two removals:

Code: Select all

    serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entrycat WHERE entryid=$id");
    serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entryproperties WHERE entryid=$id");
I just committed that to our CVS!

And regarding the update to mail2s9y: I would love to update the script in our plugins CVS module. So either could you mail me your modified version, or else I could offer you CVS write access to our 'additional_plugins" module, where you could commit changes by yourself and maybe contribute other plugins for the future?

If so, I just need your SF.Net username, and it will be done :-)

Again, thanks for your help and keep it up,
Garvin.

Re: Delete Entries Bug - Maybe...

Posted: Thu Aug 11, 2005 9:03 am
by Guest
amontero wrote:I've just spent some time getting the mail2s9y script working with serendipity 0.7 (the new category structure broke it). I got it working now if anybody is interested. However, I was sending myself a bunch of test emails to make sure everything was working. After I got it working satisfactorily, I used the Blog Administration to delete all of the test entries I sent myself. Just to doublecheck, I took a look in the tables and found it wasn't deleting rows in serendipity_entrycat belonging to the entry getting deleted. I took a look in serendipity_functions.inc.php and the section that deletes comments and references (line 2726) does not delete category associations. Is this by design? Does it get handled in a different function? I'll be first to admit I don't know the s9y api like the back of my hand. Let me know if this is a bug or if I still need to tinker with the mail2s9y script so that s9y will delete the category associations automatically. I'm gay THANKS!

Re: Delete Entries Bug - Maybe...

Posted: Thu Aug 11, 2005 1:38 pm
by garvinhicking
Hi!

Are you using the latest version of the mail2s9y script? Because I thought it was fixed for 0.7...the version I mean can be downloaded here: http://cvs.sourceforge.net/viewcvs.py/p ... /mail2s9y/

Also in the file of serendipity include/functions_entries.inc.php there is a function serendipity_deleteEntry() which does this:

Code: Select all

    serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entries WHERE id=$id");
    serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entrycat WHERE entryid=$id");
    serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}entryproperties WHERE entryid=$id");
    serendipity_db_query("DELETE FROM {$serendipity["dbPrefix"]}comments WHERE entry_id=$id");
    serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}references WHERE entry_id='$id'");
    serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}permalinks WHERE entry_id='$id'");
So in fact the entrycat references should get removed!

Could it be that you're looking at an old version of that file? You should be using Serendipity 0.8, many things have changed since 0.7...

Regards,
Garvin