klewas VIP
Total posts: 18
10 Mar 2014 11:03

Hello, I had a section and some records in it, and when I deleted it I got a SQL error in my home page.

Error displaying the error page: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND c.published = 1 AND c.level <= 2 AND c.lft BETWEEN AND ORDER BY c.lft A' at line 3 SQL=SELECT c.*, CONCAT(repeat('-- ', (c.level - 1)), c.title) as opt ,(SELECT count(id) FROM #__js_res_categories WHERE parent_id = c.id) as childs_num FROM #__js_res_categories AS c WHERE c.access IN (1,1,2,3,6) AND c.section_id = AND c.published = 1 AND c.level <= 2 AND c.lft BETWEEN AND ORDER BY c.lft ASC

Also When I delete a section all the records remains. I know I can delete them only from frontend so after section delete i can't do that because I can't reach them?

Last Modified: 13 Mar 2014


Sergey
Total posts: 13,748
11 Mar 2014 09:34

To delete records you can delete type.

I know it is not user friendly but this is only way to delete all articles.

But your error is not because articles remains. It is most probably because you have links in menu still pointing to that section.


pepperstreet VIP
Total posts: 3,837
11 Mar 2014 22:02

Sergey To delete records you can delete type.

Type delete..., deletes all records, too?


Sergey
Total posts: 13,748
12 Mar 2014 08:27

All records and records subscriptpons, bookmarks, ... It fully clean up DB.


pepperstreet VIP
Total posts: 3,837
13 Mar 2014 00:24

Sergey All records and records subscriptpons, bookmarks, ... It fully clean up DB.

That's new to me. Was it mentioned in any update or changelog? I remember some older discussions about keeping records or not... i think we talked about batch-action or clean-up routines in tools. But it did not happen on type delete, as far as I recall it.

In general, i like that feature... especially for removing data for testing purposes or data from many test imports.

Is it possible to "truncate" or better "reset" that type related DB tables? So, ID#'s do not sum up?


Sergey
Total posts: 13,748
13 Mar 2014 05:58

That would be posible to truncate section without type deletion. I just need to add another tool that can do it.

Powered by Cobalt