Add hook for example content

Created on 2 February 2010, over 15 years ago
Updated 19 July 2023, almost 2 years ago

Not sure if this is a good idea or not... just kinda pondering.

In Drupal 7 core, Contact module now does some logic in hook_install() where it pre-populates a "Website feedback" contact category. This is nice for new users, maybe even the majority of users, but it's extremely annoying for those who know what they're doing, and/or want super-fine-grained control over this (e.g. install profiles) because they have to then go in and either edit or delete that category, which is an extra step. It also breaks the ideas that modules should be functional pieces and not force-feed assumptions about how they will be used.

Organic Groups goes the totally opposite way, where there are certain things it could do / used to do to make things much easier for people (such as set up a "Group" content type pre-set as a "Group" node, and a "Group post" type pre-set as postable to groups), but it doesn't. Presumably because, again, these kind of assumptions really tick off those who know what they're doing and want to make Project nodes into groups, for example. It's extra work to un-do for them. It also locks users into thinking that that's the only way to use the module, when there are a plethora of options.

One idea is to put this kind of "bootstrap" logic into a special hook, like "hook_example_content()" which could optionally be invoked (maybe a checkbox in the user interface as you're enabling a module, or a global setting..?) for people who like having the little helping hand, but they're not hard-wired into what really should be an install profile's realm.

✨ Feature request
Status

Postponed: needs info

Version

9.5

Component
BaseΒ  β†’

Last updated about 18 hours ago

Created by

πŸ‡¨πŸ‡¦Canada webchick Vancouver πŸ‡¨πŸ‡¦

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024