Drupal 11.4.11 composer install.

I don't know if I messed up (I haven't installed Drupal in several years) or what happened but there are no default content types.  This Issue seems to relate but is closed.

I didn't notice the missing content types so I started installing modules but no content types were created for the modules.  I installed Default Content Tools even thought I thought I read somewhere it wasn't needed anymore. I then had to install  Devel to reinstall modules (that worked to create the content types).

How can I get the default content types built?

Comments

ressa’s picture

Yes, while I understand the goal of slimming down Drupal core, I also miss the Article content type and Tags vocabulary, removed in #3587118: Remove content types from the standard install profile and recipe and #3588274: Remove Tags vocabulary from Standard profile and recipe:

I created an MR for Search API in #3615198: Database Search Defaults dependencies Article and Page have been removed to add Article content type with Tags, to use with Search API's Database Search Defaults. The issue was closed, since another solution will be pursued (dynamically use whichever content type is available) but the MR works well.

Create Article content type and Tags vocabulary with recipe

Here's how you can create an Article content type and Tag vocabulary from the patch. Run this from the root of your Drupal 11 project. Note: You do not need the Search API module:

$ wget -O article-recipe.diff https://git.drupalcode.org/project/search_api/-/merge_requests/348.diff 
$ patch -p1 < article-recipe.diff 
$ cd web
$ drush recipe ../recipes/article
2/2 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
Applied Article content type recipe.
 [OK] Article content type applied successfully
markbannister’s picture

Thanks so much.

This is going to be quite confusing and put people off.  You can't even install Search API without this.  Also  Typo on the last line of your install code. Only one dot.

drush recipe ./recipes/article

Edit:  Oops, more issues.  Can't enabled "Database Search Defaults"  because:

  • ..missing field comments from Articles. 
  • Can't add field Comment to type Articles because of missing Comment Type. 
  • Created a comment type, but it doesn't show up when adding the comment
  • Tried drush cr and updated
ressa’s picture

Sorry if it wasn't clear, but you do not need to use the Search API module, the patch works well all by itself in Drupal core, and will create the Article recipe config inside the recipes folder. Please check the content of the patch file.

UPDATE: I added "Run this from the root of your Drupal 11 project. Note: You do not need the Search API module" above, to make this clearer.