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.
Updated: Comment #0
Problem/Motivation
Forum module creates the forum vocabulary in code, but as each install would have a different UUID this will lead to content staging issues.
Proposed resolution
vid: forums
uuid: c1341fb5-045a-4af4-9b06-6db165364a5f
name: Forums
description: 'Forum navigation vocabulary'
hierarchy: 1
weight: -10
status: true
langcode: en
Remaining tasks
Patch
Test
User interface changes
None
API changes
None
Related Issues
Follow-up from #1951268: Convert /forum and /forum/% to new router, remove forum_forum_load(), forum_get_topics(), create Forum service.
[2032699]
Comment | File | Size | Author |
---|---|---|---|
#9 | drupal8.forum-module.2077435-9.patch | 2.89 KB | andypost |
#1 | yml-vocab-2077435.patch | 472 bytes | larowlan |
Comments
Comment #1
larowlanComment #3
larowlanPostponed on #1951268: Convert /forum and /forum/% to new router, remove forum_forum_load(), forum_get_topics(), create Forum service
Comment #4
larowlanFails are because we need the field_info_cache_clear() from #1951268: Convert /forum and /forum/% to new router, remove forum_forum_load(), forum_get_topics(), create Forum service in forum_modules_enabled(), recognize that list anywhere.
Comment #5
andypostSuppose containers should be created the same way, also related #2032699: Preserve taxonomy_forums field when uninstalling forum module
Comment #6
larowlan#1: yml-vocab-2077435.patch queued for re-testing.
Comment #7
larowlanContainer field is created with yml
Comment #9
andypostAlso removed code that creates vocabulary
Comment #10
andypostAlso I found that vocabulary is not deleted after uninstall and once forum module installed again the 'General discussion' forum is duplicated, so #2032699: Preserve taxonomy_forums field when uninstalling forum module needs land first or issues needs to be merged
Comment #11
larowlanthanks I was also working on this and added the following:
Do you think that's worth adding here?
Comment #12
larowlanRelated #2106243: Use yml files to create the forum module's comment and taxonomy term fields
Comment #13
andypostI think we should decide how install/uninstall should work, seems config entities from other modules are not deleted when module uninstalled (node type, vocabulary, fields, displays)
Now we have no disabled state so all code comments about disabled taxonomy and comment should be removed as well
1) do the forum need to delete own content and config - then we need to re-factor
hook_uninstall()
2) no (supposed) then
hook_install()
needs some turning to find existing contentPS: 'General discussion' could be renamed so searching the term is fragile
Comment #14
larowlanLets not beat around the bush.
#2106243: Use yml files to create the forum module's comment and taxonomy term fields pushes the cleanup of forum_install() further and is blocked on this.
If you uninstall forum and then reinstall it you will end up with two General Discussion terms, I don't see an issue in that. Its not a regular use case.
Comment #15
andypostThe related issue is #2080823: Create API to discover config entities' soft dependencies and use this to present a confirm form on module uninstall
Comment #16
webchickWow, this cleans up a surprising amount of totally ugly code!
Committed and pushed to 8.x. Thanks!
Comment #17.0
(not verified) CreditAttribution: commentedUpdated issue summary.