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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

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).

macgirvin’s picture

-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.

greggles’s picture

@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.

macgirvin’s picture

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.

catch’s picture

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

greggles’s picture

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

catch’s picture

tags.

macgirvin’s picture

tags.

Works for me.

Dries’s picture

I'd support a default tags vocabulary for articles.

catch’s picture

Status: Active » Needs review
FileSize
1011 bytes

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.

samirnassar’s picture

Patch applies cleanly. Have not tested functionality.

Dries’s picture

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

catch’s picture

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

lut4rp’s picture

Status: Needs review » Reviewed & tested by the community

Working fine!

Dries’s picture

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.

keith.smith’s picture

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.');

catch’s picture

Title: Usability: default tags vocabulary » forum.test is broken (was default tags vocabulary)
Category: task » bug
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.

catch’s picture

Assigned: Unassigned » catch
Status: Needs work » Needs review
FileSize
1012 bytes

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

catch’s picture

FileSize
1.17 KB

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.

keith.smith’s picture

FileSize
1.52 KB

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

(This just slightly rewords some descriptions and comments.)

catch’s picture

FileSize
1.47 KB
1.47 KB

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).

chx’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
1.47 KB

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

Dries’s picture

Status: Reviewed & tested by the community » Fixed

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

catch’s picture

Title: forum.test is broken (was default tags vocabulary) » Default tags vocabulary
Category: bug » task
Priority: Critical » Normal

resetting title/status.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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