TryGhost / Ghost

Independent technology for modern publishing, memberships, subscriptions and newsletters.
https://ghost.org
MIT License
46.85k stars 10.2k forks source link

Remove Unused Tags #1506

Closed zettam closed 10 years ago

zettam commented 10 years ago

Tags are useful. However, when it's typed wrong, it's impossible to remove a tag from the "suggestions" popup which appears when typing a tag. This issue becomes annoying when it suggests the tag with the type error.

budi commented 10 years ago

I'd like to give this one a bump.

Issue Summary

Unused tags will always shows on autocomplete. Tried on Chrome 31.0.1650.63 Mac 10.8.5.

Steps to Reproduce

  1. Create a new tag within a post, preferably mistyped one. Let's say "Foos" because you aren't using Dvorak layout.
  2. Accidentally update the post.
  3. Create a new post, try to tag it with "Food", discover your typo, tag the post with "Food". Update.
  4. Go back to the previous post where "Foos" lays. Correct your wrong.
  5. March to your favourite Japanese restaurant and order the blowfish sushi.
  6. Write about the blowfish sushi on your Ghost blog. Both "Foos" and "Food" will be suggested to you.

I am not Dave Grohl and I never write about the frozen custard. How should I atone my only sin, the unused, mistyped tag? Will I be haunted by "Foos" for the rest of my life?

HoddzDJ commented 10 years ago

I guess the only way to get over this is go into the database and remove the tag. I would also hope there would be a tag management area coming in a future update, but I haven't looked on the roadmap.

If it's not going to be in the core, then there is no doubt in my mind that this would be a very simple plugin to create.

Damiya commented 10 years ago

Definitely feels like something that belongs in Core, at least imo; if you can add the tags in the base system, you should be able to remove them in the base system as well.

On 1/16/2014 2:59 PM, Ben Hodder wrote:

I guess the only way to get over this is go into the database and remove the tag. I would also hope there would be a tag management area coming in a future update, but I haven't looked on the roadmap.

If it's not going to be in the core, then there is no doubt in my mind that this would be a very simple plugin to create.

— Reply to this email directly or view it on GitHub https://github.com/TryGhost/Ghost/issues/1506#issuecomment-32556466.

HoddzDJ commented 10 years ago

I have to agree with you Katie. I see your point, however I don't think it will be a high priority if it does come to the core.

budi commented 10 years ago

I think the core fix will only need to count how many post attached with said tags. If there are none, don't suggest it on the autocomplete. A plugin will have more advanced feature, like if you attach the tag in multiple posts, you would want to edit the tag name, not editing each post.

HoddzDJ commented 10 years ago

I think it is probably going to be a plugin issue, like you say. Although built into the core would be good. We'll have to see what the future holds I guess.

budi commented 10 years ago

Sure. For now people should do a quick hack like they did on #1402

ErisDS commented 10 years ago

This feature will appear in core as part of #2119 - this issue is a draft at present but when ready will document the intended features around editing and removing tags.

liclac commented 10 years ago

For the record, a quick way to delete all tags with no posts associated is to run this SQL query: DELETE FROM tags WHERE id NOT IN (SELECT tag_id FROM posts_tags);

sqlite3 syntax, other backends may have slight differences.