Support

Akeeba Ticket System

#27370 Non empty category deletion

Posted in ‘Akeeba Ticket System for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Ticket System version
n/a

Latest post by arnaudlu on Monday, 20 March 2017 08:22 CDT

arnaudlu
Hello,

It's just a remark, but I think it should not be possible to delete a category when it contains tickets.
Tickets without a category are listed but user can't edit them (error 403).

Best regards
Arnaud

nicholas
Akeeba Staff
Manager
I agree with you but the problem is that ATS categories are not managed by ATS. They are managed by Joomla's own com_categories component. Unfortunately and to the best of my knowledge com_categories does not let you prevent category deletion when it contains items. The reason behind this is that you cannot tell com_categories which table contains the "items" and which column of the table is the category key. com_categories can only do that for its own categories, i.e. categories containing com_content items.

You can see that com_categories exhibits the same behavior even for core Joomla! components, such as Banners. Create a banners category, put some banners in it and then go to Banners, Categories and delete it. It's gone right away, no questions asked...

The question you may have now is "if com_categories is so bad why don't you guys use your own code". There are two reasons.

First, if you want to use Joomla! ACLs to define who has what privileges on a category you need asset tracking. Due to the dated asset tracking architecture in Joomla! the only way to do it supporting a wide variety of Joomla! versions AND make it forwards compatible is using com_categories. In other words, if we didn't use com_categories the access control in the ticket system would break randomly with newer Joomla! releases, we wouldn't be able to even upgrade our site (major security issue) and we'd have to drop support for old versions of Joomla! as soon as a new version came out. All of that is a nightmare.

The other reason is that our users wanted integration with Joomla! Tags. Unfortunately that's a piece of bad Joomla! architecture I personally opposed in 2011-2012 but nobody wanted to heed my advice. It works in an unnecessarily covoluted way which involves having mirror copies of data in the UCM tables. Trying to implement tagging on your own objects is notoriously hard. When we were writing ATS our framework, FOF, didn't support tags properly. So, no com_categories, no tags, people are angry.

As I said, I do agree with you but non-empty category deletion would introduce such bigger issues that I don't really want to even think about touching it. Just be careful not to delete categories with tickets, I guess.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

arnaudlu
Thank you very much for your answer, complete and clear.
Best regards,
Arnaud

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!