Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#22 | tags_doh.patch | 1.47 KB | chx |
#21 | tags_doh.patch | 1.47 KB | catch |
#20 | tags_doh_1.patch | 1.52 KB | keith.smith |
#19 | tags_doh.patch | 1.17 KB | catch |
#18 | tags_doh.patch | 1012 bytes | catch |
Comments
Comment #1
gregglesI 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).
Comment #2
macgirvin CreditAttribution: macgirvin commented-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.
Comment #3
greggles@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.
Comment #4
macgirvin CreditAttribution: macgirvin commentedCorrect - 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.
Comment #5
catchI'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
Comment #6
gregglesSeems reasonable. What are you going to call the default tags vocabulary? :p
Comment #7
catchtags.
Comment #8
macgirvin CreditAttribution: macgirvin commentedWorks for me.
Comment #9
Dries CreditAttribution: Dries commentedI'd support a default tags vocabulary for articles.
Comment #10
catchHere'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.
Comment #11
samirnassar CreditAttribution: samirnassar commentedPatch applies cleanly. Have not tested functionality.
Comment #12
Dries CreditAttribution: Dries commentedI think this looks good. Too bad we can't set this up using a clean taxonomy module API ...
Comment #13
catchWe 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
Comment #14
lut4rp CreditAttribution: lut4rp commentedWorking fine!
Comment #15
Dries CreditAttribution: Dries commentedI've committed this to CVS HEAD. Let's keep working on the minimum profile as well. Thanks catch.
Comment #16
keith.smith CreditAttribution: keith.smith commentedSorry. 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.');
Comment #17
catchThis 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.
Comment #18
catchShould be NULL instead of a hard-coded vid since it's auto-increment. Whoops.
Comment #19
catchSubsequent 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.
Comment #20
keith.smith CreditAttribution: keith.smith commentedCan I make the catch's patch slightly wordier? Please?
(This just slightly rewords some descriptions and comments.)
Comment #21
catchThird 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).
Comment #22
chx CreditAttribution: chx commentedGood one. Rerolled against HEAD, absolutely no changes, no credit please.
Comment #23
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks for the quick follow-up.
Comment #24
catchresetting title/status.
Comment #25
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.