Opened 4 years ago

Closed 3 years ago

# Tags of some plugin are broken

Reported by: Owned by: Matoba Akihiro Michael Renzmann normal TracHacks normal Ryan J Ollos, Steffen Hoffmann

### Description

Tags of some plugin are broken. It seems be overwritten by spam. TagsPlugin on this site should store changes.

### comment:1 follow-up:  3 Changed 4 years ago by Jun Omae

Thanks for your reporting! We have restored the contents of each page, however, cannot restore those tags. The tags don't have the history.

Anyway, I've restore from the following pages.

But I cannot restore the tag of http://trac-hacks.org/wiki/PageName, the page doesn't exist....

Last edited 4 years ago by Jun Omae (previous) (diff)

### comment:2 Changed 4 years ago by Jun Omae

Cc: Ryan J Ollos Steffen Hoffmann added; anonymous removed

### comment:3 in reply to:  1 ; follow-up:  8 Changed 4 years ago by Jun Omae

But I cannot restore the tag of http://trac-hacks.org/wiki/PageName, the page doesn't exist....

The following pages have the same issue which is spam tagging and wiki page doesn't exist.

### comment:4 Changed 4 years ago by Steffen Hoffmann

For getting back former tags the only hope is to read a db backup from before the SPAM overwrite.

In general tags are currently version-less, and they where ever before. While SPAM is a valid argument for adding versions as demanded by #2429 for years, the design of an appropriate implementation raises some questions.

### comment:5 Changed 3 years ago by Steffen Hoffmann

Consider the proposed patch in #2429 for tag revision support to become available soon.

### comment:6 Changed 3 years ago by Steffen Hoffmann

In 13428:

TagsPlugin: Introduce tag version recording, requires db upgrade, refs #2429.

This will especially help recovering tags after SPAM tagging, refs #11205.
Therefore configurable behavior enables tracking of wiki page tag changes, but
excludes ticket keywords changes by default.

### comment:7 Changed 3 years ago by Ryan J Ollos

Let me know when you feel that the tag versioning added to TagsPlugin is stable, and I'll then go ahead and upgrade TagsPlugin on trac-hacks.

### comment:8 in reply to:  3 ; follow-ups:  9  10 Changed 3 years ago by Ryan J Ollos

The following pages have the same issue which is spam tagging and wiki page doesn't exist.

Any idea of the best way to deal with those pages? I'm thinking that we need a script to remove orphaned tags from the database. We should also make sure that tags are deleted when wiki pages are deleted so that this issue can't occur again.

### comment:9 in reply to:  8 ; follow-up:  11 Changed 3 years ago by Steffen Hoffmann

The following pages have the same issue which is spam tagging and wiki page doesn't exist.

Any idea of the best way to deal with those pages? I'm thinking that we need a script to remove orphaned tags from the database.

Yes, but ...

We should also make sure that tags are deleted when wiki pages are deleted so that this issue can't occur again.

This is guaranteed by using wiki page change listener support that has been there since 0.6, so we'll should check an trace of db insanity more closely.

### comment:10 in reply to:  8 Changed 3 years ago by Ryan J Ollos

The following pages have the same issue which is spam tagging and wiki page doesn't exist.

Any idea of the best way to deal with those pages?

It was possible to get rid of those tags by creating and then deleting the page.

I looked over the tags page and found a few more spam entries, but it could use another review: tags.

### comment:11 in reply to:  9 ; follow-up:  12 Changed 3 years ago by Ryan J Ollos

Resolution: → fixed new → closed

We should also make sure that tags are deleted when wiki pages are deleted so that this issue can't occur again.

This is guaranteed by using wiki page change listener support that has been there since 0.6, so we'll should check an trace of db insanity more closely.

It appears that all of the issues in this ticket are resolved, but it would be good to check that tags can't be added to non-existent wiki pages in some way, as you suggest. The issue we were seeing might just be from an earlier implementation of TagsPlugin that wasn't as robust as what we are running now.

The feature in #11661 would be valuable as a next step to help with hunting down spam entries.

### comment:12 in reply to:  11 Changed 3 years ago by Steffen Hoffmann

We should also make sure that tags are deleted when wiki pages are deleted so that this issue can't occur again.

This is guaranteed by using wiki page change listener support that has been there since 0.6, so we'll should check an trace of db insanity more closely.

It appears that all of the issues in this ticket are resolved, but it would be good to check that tags can't be added to non-existent wiki pages in some way, as you suggest.

I fail to see, when I suggested that, anyway IWikiPageManipulator method tagsplugin/tags/0.7/tractags/wiki.py#L123 WikiTagInterface.validate_wiki_page evaluates page properties that cannot exist for a non-existent Wiki page, so I see no potential issue in the current design.

The issue we were seeing might just be from an earlier implementation of TagsPlugin that wasn't as robust as what we are running now.

Oh, these are/were likely remains of deleted or moved pages before re-parenting (IWikiChangeListener method wiki_page_renamed) and deleting (IWikiChangeListener method wiki_page_deleted) of Wiki page tags had been introduces more recently.

Last edited 3 years ago by Ryan J Ollos (previous) (diff)

### Modify Ticket

Change Properties