Every time an article with at least one tag is saved, a new row is inserted into #__ucm_content instead of updating the existing one. Articles that have never had a tag assigned never get any row at all in #__ucm_content. Over time, this leaves dozens of orphaned rows per article, causing an unbounded database data leak.
5.4
Only a single entry should be updated or maintained in the #__ucm_content table for that specific article ID and type alias. Repeatedly saving an article should not accumulate duplicate rows.
An unbounded data leak occurs. On every single save cycle, a brand new duplicate row with a new core_content_id is inserted into #__ucm_content while the deprecated #__ucm_base table remains empty.
libraries/src/Helper/TagsHelper.php::postStoreProcess() (marked @deprecated 5.3 will be removed in 7.0) looks up the existing core_content_id via:
\(query =\)db->getQuery(true)
->select(\$db->quoteName('ucm_id'))
->from(\$db->quoteName('#__ucm_base'))
->where([...]);
\$primaryId = \(db->loadResult();\)result = \(coreContentTable->load(\)primaryId);However, libraries/src/Table/CoreContent.php::storeUcmBase() — the method responsible for keeping #__ucm_base populated — is also marked @deprecated 5.4.0 will be removed in 7.0 without replacement, and is never called from CoreContent::store() anymore. So #__ucm_base never receives new rows, postStoreProcess() always fails to find a matching ucm_id, $coreContentTable->load(null) resets to a fresh record, and the next store() call performs an INSERT instead of an UPDATE.
#__ucm_content (in our case, 76 of 429 articles had 2–20 duplicate rows each after normal editorial use over ~1.5 years).Since both deprecated methods are slated for removal in 7.0 "without replacement," it would help to know whether the intended replacement mechanism (post-UCM) already avoids this duplication, or whether postStoreProcess() should stop relying on #__ucm_base in the interim (e.g., look up the existing row directly via core_content_item_id + core_type_alias on #__ucm_content instead of the now-dead #__ucm_base index).
Happy to provide the full query log capture if useful.
| Labels |
Added:
No Code Attached Yet
bug
|
||
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-09-11 14:10:20 |
| Closed_By | ⇒ | chmst |
Sorry
Thank you for reporting, But I close it as this issue is resolved in #48221.