<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>tags not being cleaned from rampage tables when tagged object is deleted</title> 
  <pubDate>Tue, 07 Apr 2026 05:58:27 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/14112</link> 
  <atom:link rel="self" type="application/rss+xml" title="tags not being cleaned from rampage tables when tagged object is deleted" href="https://bugs.horde.org/ticket/14112/rss" /> 
  <description>tags not being cleaned from rampage tables when tagged object is deleted</description> 
 
   
   
  <item> 
   <title>Versions:
Horde 5.2.2
Turba H5 (4.2.2)
Kronolith H5 (4.2.</title> 
   <description>Versions:
Horde 5.2.2
Turba H5 (4.2.2)
Kronolith H5 (4.2.2)
Mnemo H5 (4.2.1)

rampage_* tables not updated when a tagged object is deleted:

rampage_objects still keeps the deleted object reference

rampage_tag_stats still keeps the usage count including the deleted object

rampage_user_tag_stats still keeps the usage count including the deleted object

How to reproduce:

1 - Create two calendar events and tag them with &#039;tagpersistencetest_calendar&#039;

2 - Create two contacs and tag them with &#039;tagpersistencetest_contact&#039;

3 - Create two notes and tag them with &#039;tagpersistencetest_notes&#039;

4 - Run this query on the database:

SELECT 
rampage_tags.tag_name,
rampage_tag_stats.count as tagcount,
rampage_user_tag_stats.count as usertagcount,
rampage_objects.object_name,
rampage_types.type_name
from
rampage_tags 
left join rampage_tag_stats using (tag_id)
left join rampage_user_tag_stats using (tag_id)
left join rampage_tagged using (user_id, tag_id)
left join rampage_objects using (object_id)
left join rampage_types using (type_id)
where tag_name regexp &#039;tagpersistencetest_&#039;;

5 - Verify the usage count and tagged objects; take note of [object_id]s

6 - Delete (UI) the created notes, contacts and events.

7 - Re-run the query

Result:

The note and contact objects and tags/tag count remain the same in all tables.

The event object is no longer in rampage_tagged, but still in rampage_objects (look for its object_id), and the tage is still in rampage_tags, rampage_tag_stats, and rampage_user_tag_stats.

Expected:

Deleted object should be removed from rampage_objects and rempage_tagged, tag counters should decrement.
</description> 
   <pubDate>Tue, 15 Sep 2015 16:33:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88690</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit 1b3e4edde439</title> 
   <description>Changes have been made in Git (master):

commit 1b3e4edde4397772bfc1ca0f6db63c0de48ee109
Author: Michael J Rubinsky &lt;mrubinsk@horde.org&gt;
Date:   Wed Sep 16 11:21:31 2015 -0400

    Bug: 14112 Remove tags when deleting objects.

 mnemo/lib/Driver.php |    7 +++++++
 nag/lib/Driver.php   |    9 ++++++++-
 turba/lib/Driver.php |   10 +++++++++-
 3 files changed, 24 insertions(+), 2 deletions(-)

http://github.com/horde/horde/commit/1b3e4edde4397772bfc1ca0f6db63c0de48ee109</description> 
   <pubDate>Wed, 16 Sep 2015 15:40:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88697</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit 26c3700dc513</title> 
   <description>Changes have been made in Git (master):

commit 26c3700dc513e295b3fd5c9c6b88c225639d5cc6
Author: Michael J Rubinsky &lt;mrubinsk@horde.org&gt;
Date:   Wed Sep 16 11:37:42 2015 -0400

    Only increment counters if we actually tagged the item.
    
    Related to Bug: 14112

 content/lib/Tagger.php |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

http://github.com/horde/horde/commit/26c3700dc513e295b3fd5c9c6b88c225639d5cc6</description> 
   <pubDate>Wed, 16 Sep 2015 15:40:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88698</link> 
  </item> 
   
  <item> 
   <title>&gt; Versions:
&gt; Horde 5.2.2
&gt; Turba H5 (4.2.2)
&gt; Kronolith </title> 
   <description>&gt; Versions:
&gt; Horde 5.2.2
&gt; Turba H5 (4.2.2)
&gt; Kronolith H5 (4.2.2)
&gt; Mnemo H5 (4.2.1)
&gt;
&gt; rampage_* tables not updated when a tagged object is deleted:
&gt;
&gt; rampage_objects still keeps the deleted object reference

This was originally due to the fact that Content/Rampage is not only concerned with tags. The idea was this was to be used to map any related content together. This still may happen, but it&#039;s not currently implemented.  In other words, we can&#039;t just delete the object reference when the tag count goes to zero, but only when the object is explicitly deleted. I&#039;ll add code to do this, but need to think about where it will go, since it doesn&#039;t really belong in a Tagger class.

&gt; rampage_tag_stats still keeps the usage count including the deleted object

This was true for all applications except for Kronolith, which actually did it correctly but there was an error in Content_Tagger that would essentially increment the count anytime tags were edited and still contained some of the same tags. So, e.g., adding a new tag after the object already contained tags would increment the count for ALL tags, not just the added one. This has been fixed in Git.
</description> 
   <pubDate>Wed, 16 Sep 2015 15:49:37 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88699</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit f20348e01030</title> 
   <description>Changes have been made in Git (master):

commit f20348e01030c3769b410b3128e689dc9368bed7
Author: Michael J Rubinsky &lt;mrubinsk@horde.org&gt;
Date:   Wed Sep 16 12:41:02 2015 -0400

    Bug: 14112 Remove the object from the Content app when deleting.

 kronolith/lib/Driver.php |    4 ++++
 mnemo/lib/Driver.php     |    9 +++++++++
 nag/lib/Driver.php       |   16 ++++++++++++----
 turba/lib/Driver.php     |   14 +++++++++++---
 4 files changed, 36 insertions(+), 7 deletions(-)

http://github.com/horde/horde/commit/f20348e01030c3769b410b3128e689dc9368bed7</description> 
   <pubDate>Wed, 16 Sep 2015 16:50:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88700</link> 
  </item> 
   
  <item> 
   <title>Fixed in various applications and Content.</title> 
   <description>Fixed in various applications and Content.</description> 
   <pubDate>Wed, 16 Sep 2015 16:59:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88701</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (FRAMEWORK_5_2):

commit f7725</title> 
   <description>Changes have been made in Git (FRAMEWORK_5_2):

commit f7725beb730407fb3f38d521a62eb532b5a50b4a
Author: Michael J Rubinsky &lt;mrubinsk@horde.org&gt;
Date:   Wed Sep 16 11:21:31 2015 -0400

    Bug: 14112 Remove tags when deleting objects.

 mnemo/lib/Driver.php |    7 +++++++
 nag/lib/Driver.php   |    9 ++++++++-
 turba/lib/Driver.php |   10 +++++++++-
 3 files changed, 24 insertions(+), 2 deletions(-)

http://github.com/horde/horde/commit/f7725beb730407fb3f38d521a62eb532b5a50b4a</description> 
   <pubDate>Wed, 16 Sep 2015 17:16:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88702</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (FRAMEWORK_5_2):

commit 8979b</title> 
   <description>Changes have been made in Git (FRAMEWORK_5_2):

commit 8979b2f5dca0246a2ae8289492f14234c7e47050
Author: Michael J Rubinsky &lt;mrubinsk@horde.org&gt;
Date:   Wed Sep 16 11:37:42 2015 -0400

    Only increment counters if we actually tagged the item.
    
    Related to Bug: 14112

 content/lib/Tagger.php |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

http://github.com/horde/horde/commit/8979b2f5dca0246a2ae8289492f14234c7e47050</description> 
   <pubDate>Wed, 16 Sep 2015 17:16:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88703</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (FRAMEWORK_5_2):

commit 9522f</title> 
   <description>Changes have been made in Git (FRAMEWORK_5_2):

commit 9522f40eb957d4fa2d94a84677f13dd0694a12dc
Author: Michael J Rubinsky &lt;mrubinsk@horde.org&gt;
Date:   Wed Sep 16 12:41:02 2015 -0400

    Bug: 14112 Remove the object from the Content app when deleting.

 kronolith/lib/Driver.php |    4 ++++
 mnemo/lib/Driver.php     |    9 +++++++++
 nag/lib/Driver.php       |   16 ++++++++++++----
 turba/lib/Driver.php     |   14 +++++++++++---
 4 files changed, 36 insertions(+), 7 deletions(-)

http://github.com/horde/horde/commit/9522f40eb957d4fa2d94a84677f13dd0694a12dc</description> 
   <pubDate>Wed, 16 Sep 2015 17:17:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88704</link> 
  </item> 
   
  <item> 
   <title>This still needs to be BFN&#039;ed.</title> 
   <description>This still needs to be BFN&#039;ed.</description> 
   <pubDate>Wed, 23 Sep 2015 16:55:12 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88750</link> 
  </item> 
   
  <item> 
   <title>Done.</title> 
   <description>Done.</description> 
   <pubDate>Fri, 25 Sep 2015 14:33:02 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14112#t88751</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
