Default tags vocabulary

catch - May 23, 2008 - 09:41
Project:Drupal
Version:7.x-dev
Component:install system
Category:task
Priority:normal
Assigned:catch
Status:closed
Description

Increasingly I think the default install profile should be adding more defaults settings and/or content to Drupal.

A good start would be a 'tags' vocabulary, assigned to the 'article' content type. That way, you install Drupal, post an article, and you can add tags straight away. How nice would that be?!

For those of us who may use neither the article content type nor a 'tags' vocabulary in a new install, I'm going to open a sister version of this issue for an 'advanced user' profile which has pretty much nothing in it.

#1

greggles - May 23, 2008 - 21:42

I also think this should have some default terms, like "Drupal" and perhaps another which could be tagged onto an automatically created first node.

Also, here is the "advanced user" issue: #261882: 'Minimum' install profile. (also subscribe).

#2

macgirvin - May 23, 2008 - 22:28

-1 on first post. A lot of packages do this and you have to go in and delete the sucker. I personally get annoyed and offended that a package creates published content that I did not approve and without any choice in the matter. It makes me wonder if they had to do that because there's a foreach() bug in the code which manifests itself when there's no content. Don't laugh.

I also take issue with Drupal being in any default vocabulary. Some of us are building sites that aren't about Drupal, hard as it may be to believe.

However one of the first things I've done on several sites was import a list of general conversational tag terms that it took me a long time to compile. Don't even know if the xml taxonomy import/export module is still around these days, but maybe this should be an issue for that module to provide an example file with an editable and generally useful starting vocabulary. It would be very useful indeed having things like autos, music, computers, love, war, weather - and the other top 200 or so conversational topics covered out of the box or with one extra download.

The problem doing it in core is then translations are required and you'll also never get folks to agree on what should be on the list by default.

#3

greggles - May 24, 2008 - 00:48

@macgirvin - Did you write this before reading the Advanced user profile issue? That issue addresses the problem of having to delete these if you are an "advanced user" because you choose an installation path where they don't get created. And let's ignore my comment about using "Drupal" in the vocabulary and focus on whether we should have a term in it by default or not. We can decide on the word later.

Should we have a default taxonomy?
Should we have one or more default terms in that taxonomy?

I agree with Catch and think the answer to both questions is yes and that we should have one or a very few terms in the taxonomy.

#4

macgirvin - May 24, 2008 - 05:21

Correct - I wrote here before seeing the other topic. That addresses the issue. I'm all in favor of a default taxonomy, and I'd like to see more than one or two terms in it. My default category list is around 150 terms. But I'm also not looking forward to the endless debate about what terms should go in by default and whether it belongs in core at all.

We could spend months on whether or not to include the s-e-x tag. Many will feel it is a mandatory topic of conversation, and an equal number will be opposed to having the word appear on their website and soiling their pristine reputation.

#5

catch - May 24, 2008 - 21:10

I'd quite like to leave this issue only for a default tags vocabulary - and add default terms and/or additional vocabularies in another issue - since as soon as we introduce anything to do with content this will end up 100 posts long and no viable patch. So I'll answer this in the groups.drupal.org thread I started for default content in general :) http://groups.drupal.org/node/11691

#6

greggles - May 24, 2008 - 22:00

Seems reasonable. What are you going to call the default tags vocabulary? :p

#7

catch - May 25, 2008 - 08:03

tags.

#8

macgirvin - May 25, 2008 - 11:29

tags.

Works for me.

#9

Dries - June 14, 2008 - 06:53

I'd support a default tags vocabulary for articles.

#10

catch - June 20, 2008 - 10:06
Status:active» needs review

Here's a patch. I had a quick look around and it seems like using db_query directly is the only way to do this in install profiles.

AttachmentSizeStatusTest resultOperations
tags.patch1011 bytesIgnoredNoneNone

#11

samirnassar - June 20, 2008 - 16:22

Patch applies cleanly. Have not tested functionality.

#12

Dries - June 20, 2008 - 17:02

I think this looks good. Too bad we can't set this up using a clean taxonomy module API ...

#13

catch - June 20, 2008 - 20:11

We should be able to do that with either profiles or modules [1], or sqlite support and the installer modified to allow a full bootstrap instead of the current special system. This would be a good candidate for cleaning up when either of those gets in, but both are quite a way off yet.

1. http://groups.drupal.org/node/11548

#14

lut4rp - June 21, 2008 - 16:37
Status:needs review» reviewed & tested by the community

Working fine!

#15

Dries - June 21, 2008 - 18:21
Status:reviewed & tested by the community» fixed

I've committed this to CVS HEAD. Let's keep working on the minimum profile as well. Thanks catch.

#16

keith.smith - June 22, 2008 - 01:39

Sorry. I've been away for a while trying to make a living.

I'm leaving this fixed but putting it in my tracker until I can make a patch to implement:

- // Create a default tags vocabulary for articles.
- $description = st('Tags are used to group your articles into different categories.');
- $help = st('Enter a comma separated list of words.');

+ // Create a default vocabulary named "Tags", applied by default to article content types.
+ $description = st('Tags group articles by category.');
+ $help = st('Enter a comma-separated list of words.');

#17

catch - June 23, 2008 - 10:10
Title:Usability: default tags vocabulary» forum.test is broken (was default tags vocabulary)
Category:task» bug report
Priority:normal» critical
Status:fixed» needs work

This broke forum.test - it appears to have broken the test rather than forum module itself. I get a duplicate key exception when running the test, no such error enabling forum module manually. forum.test doesn't write directly to the DB, so not sure why this is occurring yet.

#18

catch - June 23, 2008 - 14:29
Assigned to:Anonymous» catch
Status:needs work» needs review

Should be NULL instead of a hard-coded vid since it's auto-increment. Whoops.

AttachmentSizeStatusTest resultOperations
tags_doh.patch1012 bytesIgnoredNoneNone

#19

catch - June 23, 2008 - 14:57

Subsequent query for assigning to 'article' ought to ensure it's got the right vocabulary. Can't think of any situations (other than apparently simpletest) where this would happen, but can't do any harm.

AttachmentSizeStatusTest resultOperations
tags_doh.patch1.17 KBIgnoredNoneNone

#20

keith.smith - June 23, 2008 - 17:21

Can I make the catch's patch slightly wordier? Please?

(This just slightly rewords some descriptions and comments.)

AttachmentSizeStatusTest resultOperations
tags_doh_1.patch1.52 KBIgnoredNoneNone

#21

catch - June 23, 2008 - 17:28

Third in a series of "what was I thinking?", this uses db_last_insert_id to get the $vid instead of a silly query (and incorporates Keith's changes minus a word or two).

AttachmentSizeStatusTest resultOperations
tags_doh.patch1.47 KBIgnoredNoneNone
tags_doh.patch1.47 KBIgnoredNoneNone

#22

chx - June 24, 2008 - 19:15
Status:needs review» reviewed & tested by the community

Good one. Rerolled against HEAD, absolutely no changes, no credit please.

AttachmentSizeStatusTest resultOperations
tags_doh.patch1.47 KBIgnoredNoneNone

#23

Dries - June 24, 2008 - 21:27
Status:reviewed & tested by the community» fixed

Committed to CVS HEAD. Thanks for the quick follow-up.

#24

catch - June 27, 2008 - 16:27
Title:forum.test is broken (was default tags vocabulary)» Default tags vocabulary
Category:bug report» task
Priority:critical» normal

resetting title/status.

#25

Anonymous (not verified) - July 11, 2008 - 16:33
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.