Skip to main content

Drupal 8

warning: Creating default object from empty value in /var/www/venutip.com/public_html/modules/taxonomy/taxonomy.pages.inc on line 33.

Easily duplicate a content type in Drupal 8

File under

Assuming you already have a content type created and the config files checked into source control, duplicating the content type and all of its fields is very easy.

  1. Use rename to rename the machine name of the existing content type in your .yml files to the new content type’s machine name (whatever you want that to be). If you don’t have rename, it’s easy to install via homebrew: brew install rename.

    For example, if you want to change the article content type to article_copy, cd into your sync directory and run this:

    rename -s article article_copy *
    

Adding Plain Text to the list of default text formats

File under

Drupal has a hidden setting that prevents you from setting the Plain Text input format as the default if you have more than one input format available. I don’t understand why the fallback format (which, by definition, cannot be removed) should not be available as a default format, or why this setting should be hidden, but it is.

Syndicate content