Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2008-07-21 15:13:24

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: We need some testers please - Deleting Categories Problem

I didn’t want to mess with the new site too much so I’ve run this in the “vanilla” site I re-created last night using a new downloaded SVN file set. The table details I show in my earlier post are what we are looking at and I’m trying to delete the “testing” category which is for files. Here’s the query I’ve used:-

select id, name from txp_category where id IN (14) AND type='file' AND rgt - lft = 1 AND NOT name IN ('')

and this is the result shown:-

select id, name from txp_category where id IN (14) AND type='file' AND rgt - lft = 1 AND NOT name IN ('')
1/1 Query(s) Executed Successfully

I also tried to delete the “Test” category which is for articles and then used this query:-

select id, name from txp_category where id IN (7) AND type='article' AND rgt - lft = 1 AND NOT name IN ('hope-for-the-future','meaningful-labor')

with this result:-

select id, name from txp_category where id IN (7) AND type='article' AND rgt - lft = 1 AND NOT name IN ('hope-for-the-future','meaningful-labor')
1/1 Query(s) Executed Successfully

which is the same result really isn’t it? Is it not meant to tell me what the selection is?

Last edited by thebombsite (2008-07-21 15:20:26)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#38 2008-07-21 16:19:33

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: We need some testers please - Deleting Categories Problem

Select queries return a table with a result set. That’s what I’m interested in (although the fact that the query executed succesfully is a good start). You should see a table listing the ID/name combinations of categories that are approved for deletion.
Btw, if that first query does not give results (and category ID 14 isn’t deleted), then according to the query it’s not because the category is in use, because apparently none of your files are linked to a category. That’s good, makes testing easier.

If I could get access to a test install of TXP that has problems with deleting categories and DEBUG set to 1 and the rss_db… plugin installed, perhaps it’s easier to diagnose?

Last edited by ruud (2008-07-21 16:21:25)

Offline

#39 2008-07-21 19:41:41

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: We need some testers please - Deleting Categories Problem

There are no files in that install. It is totally virgin apart from renaming 1 article category and adding 1 file category.

Do you want me to send you a login?

Last edited by thebombsite (2008-07-21 19:43:49)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#40 2008-07-21 20:20:07

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: We need some testers please - Deleting Categories Problem

Yes, please.

Offline

#41 2008-07-21 20:21:41

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: We need some testers please - Deleting Categories Problem

Sent.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#42 2008-07-21 21:02:05

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: We need some testers please - Deleting Categories Problem

Heh, apparently, having DEBUG set to 1 prevents the login cookie from being sent. I need to login first before it can be set.

Offline

#43 2008-07-21 21:05:38

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: We need some testers please - Deleting Categories Problem

Done. Let me know when you need it changing back.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#44 2008-07-21 21:11:50

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: We need some testers please - Deleting Categories Problem

I’m logged in now. You can change it back.

Offline

#45 2008-07-21 21:14:22

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: We need some testers please - Deleting Categories Problem

Done.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#46 2008-07-21 21:26:10

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: We need some testers please - Deleting Categories Problem

Should be fixed in SVN changeset 2947
Thanks for reporting this. Please test with unused, used and parent categories.

Offline

#47 2008-07-21 21:30:49

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: We need some testers please - Deleting Categories Problem

OK. Thank you. I shall test it out on mockup and if all is well move it to the other sites. I’ll report back here. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#48 2008-07-21 21:51:21

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: We need some testers please - Deleting Categories Problem

All seems well.
I’ve been able to delete empty categories that aren’t also parents.
I cannot delete a category that contains articles/files/links/images.
I cannot delete a parent category even though both parent and child are empty.

You can go and test it yourself if you wish.

I think that’s a fix. Well done Ruud. I can go to bed and dream nice things ;)
I’ll migrate the fix to the other sites tomorrow and report back here if there are any problems but I’m not expecting any.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB