No Code Attached Yet bug
avatar domcotec
domcotec
3 Aug 2022

Steps to reproduce the issue

  1. Create a new custom field for categories (Navigate to Content > Fields, select 'Category' in the filter dropdown at the top of the page and click '+New' to create a new custom field and save it.)
  2. Create a new category (Content > Categories > New)
  3. In the category switch to the 'Fields' tab and add some data to the custom field you just created. Save.
    (Now in the database in table #__fields_values a new row is created with the catID, fieldID and custom field value.)
  4. Now change the publication 'Status' to 'Trash' and then go to the trash and delete the category completely.
    (Here is the potential bug: In the database table #__fields_values the row for this catID and fieldID should have been deleted, but it remains in the database.)

Expected result

Deleting a category should also delete the mapped custom field values. (This actually works for articles, but not for categories)

Actual result

The row for the deleted category ID and field ID with the field values remains in the database (unused forever).

System information (as much as possible)

Joomla! 4.1.5
PHP 7.4.30

Additional comments

avatar domcotec domcotec - open - 3 Aug 2022
avatar domcotec domcotec - change - 3 Aug 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 3 Aug 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Aug 2022
avatar domcotec domcotec - change - 3 Aug 2022
The description was changed
avatar domcotec domcotec - edited - 3 Aug 2022
avatar domcotec domcotec - change - 3 Aug 2022
The description was changed
avatar domcotec domcotec - edited - 3 Aug 2022
avatar domcotec domcotec - change - 3 Aug 2022
The description was changed
avatar domcotec domcotec - edited - 3 Aug 2022
avatar chmst
chmst - comment - 5 Aug 2022

I cannot confirm that. Did you trash the fields or did you delete them permanently (empty trash)?

avatar chmst chmst - change - 5 Aug 2022
Labels Added: Information Required
avatar chmst chmst - labeled - 5 Aug 2022
avatar domcotec
domcotec - comment - 5 Aug 2022

I deleted the category permanently, not the field.
But the cf value remains in the #__fields_values table.

It's important that you test this with a category, not with an article, because for articles it works as expected.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38379.

avatar chmst chmst - change - 13 Aug 2022
Labels Added: bug
Removed: Information Required
avatar chmst chmst - unlabeled - 13 Aug 2022
avatar chmst chmst - labeled - 13 Aug 2022
avatar joomdonation
joomdonation - comment - 22 Dec 2022

@domcotec PR #39477 should fix this issue. Please help testing so that this issue could be fixed. Thanks !

avatar joomdonation joomdonation - change - 22 Dec 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-12-22 16:51:59
Closed_By joomdonation
avatar joomdonation joomdonation - close - 22 Dec 2022
avatar domcotec
domcotec - comment - 1 Jan 2023

Thank you all! ???

Add a Comment

Login with GitHub to post a comment