Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
forum.module
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2023 at 03:09 UTC
Updated:
4 Jan 2024 at 08:09 UTC
Jump to comment: Most recent
Check all migrations referring to forum to see what needs to be done. There are 19.
$ ag -l forum core/modules/*/migrations | grep -v modules/forum | wc -l
19
static_map process plugin in the following migrations.
forum_container: is_container.
forum_vocabulary.
1. No change to usages of 'forum' in static_map process plugins
2. Remove forum_vocabulary from taxonomy module and add back in hooks when forum is enabled
3, Remove forum_container and is_container from taxonomy module and add back in hooks when forum is enabled
Items 2 and 3 are being implemented in #2914251: Move forum related logic from taxonomy migrations to new forum migrations.
Comments
Comment #2
quietone commentedThe static map and the simple assigned are ok as it. The process plugin forum_vocabulary uses a flag set in the source plugin to identify the vocabulary as a forum one, in that case the vid if the row is for a forum. Again, there is nothing there that requires the forum module.
There is no need to change or move any of these migrations that refer to forum. None of these require forum data to exist, or the forum module to be enabled.
Comment #3
quietone commentedComment #4
Manoj Raj.R commentedComment #5
Manoj Raj.R commented@quietone
What is the importance of this issue.
what is the proposed solution. Is it impacting on 10
Comment #6
quietone commented@Manoj Raj.R, this is one of the steps to deprecate the Forum module. There is more detail about that process in the parent issue, That issue also has a link to the issue where the deprecation and removal of the Forum module was approved.
I made this issue so that there was a place to discuss what happens to migrations that do anything regarding the Forum module. As for the proposed resolution, it is as stated in the Issue Summary. That is, I don't think anything needs to be done regarding the migrations listed in the Issue Summary. Therefore, nothing changes for Drupal 10 because of this issue.
Comment #7
Manoj Raj.R commentedOk!
Comment #8
larowlan@quietone for the static map ones, do we have the option of filtering out those rows in the source, and then duplicating those migrations to the forum module and doing the converse (filtering to only the forum rows)
Comment #9
smustgrave commentedAren't these files being moved to migrate_drupal to also be deprecated/removed?
Comment #10
quietone commentedRe #8. There was some discussion about this, specifically about block migrations. #3265483: Handle block migration for modules moved to contrib and #3267309: Decide whether to completely skip the migration of blocks from missing modules. In that case it was preferred to leave the migrations as is because it would allow the migrator to get an error that something was not migrated. This still needs more disucssion.
#9. Yes, that is true. However, Forum is moving to contrib so we should complete this first. That will likely happen anyway because deprecating migrate_drupal is a much bigger task.
Comment #11
quietone commentedComment #12
larowlanShould this be Needs Review, no patch/MR that I can see?
Comment #13
benjifisher@larowlan:
Would it make more sense if we changed the title to "Evaluate migrations ..." or "[Policy, no patch] Handle migrations ..."?
There is nothing wrong with migration code that supports contrib modules, so +1 for keeping the migrations as is unless they actually cause problems.
My favorite example of support in core for contrib modules is the
filter_idprocess plugin in thefiltermodule.Most of the migrations that refer to "forum" set some property using the
static_mapprocess plugin, and one or more of the keys that get mapped are related to the Forum module. This is harmless, so leave it as is.Maybe I am going outside the scope of this issue, but I support moving everything related to the
forum_vocabularyprocess plugin into the Forum module. Maybe leave the parts that are in themigrate_drupalmodule where they are; everything else is in thetaxonomymodule. Here is what that would involve:forum_vocabularysource property somewhere other than thed6_taxonomy_vocabularyandd7_taxonomy_vocabularysource plugins. I am not sure what the best way is, but we must have an event or an alter hook that lets us modify a row.hook_migration_plugins_alter()to insert the process plugin into 6 migrations, and remove the corresponding step from those migrations.I am not sure it is worth the effort, but it would have the effect of simplifying the code that is left behind when we remove the Forum module.
Similar: the code related to the
is_containersource property (set in thed7_taxonomy_termandd7_taxonomy_term_entity_translationsource plugins) and theforum_containertaxonomy field (boolean?) should be moved to the Forum module, if someone is willing to make the effort. Curiously, there is some test code related to this field, but I do not see any tests that mentionforum_vocabulary.Comment #14
benjifisherI just noticed the related issue #2914251: Move forum related logic from taxonomy migrations to new forum migrations. Perhaps we can make that issue a sibling of this one (child of the same meta issue) and use that issue to make the changes I suggested in #13.
Comment #15
smustgrave commentedIs this more a plan then a task?
Comment #16
quietone commentedI agree with #14, I am updating the meta data.
Comment #17
quietone commentedI misread #14 but am leaving the changes for now. Updated the IS with the current proposal
Comment #18
benjifisherI think something got lost in #17. Is this what you meant? (See 2 and3 in the proposed resolution.)
Comment #19
quietone commented@benjifisher, I was trying to refer to your suggestion of making this issue a sibling of #2914251: Move forum related logic from taxonomy migrations to new forum migrations. Instead I made this the parent of that one. I was thinking that here we could discuss the approach and record the decision in this one issue. Any implementations of those decisions are then children of this issue. For me, I prefer one issue on #3267261: [Meta] Tasks to deprecate Forum to represent this body of work.
I updated the IS to show that 2 and 3 of the proposed resolution are being explored in #2914251: Move forum related logic from taxonomy migrations to new forum migrations.
Comment #20
larowlanComment #22
quietone commentedI reviewed the child issue and it does resolve the points in the issue summary. I think this is now fixed.
I will set to RTBC for others to check.
Comment #23
catchThis is still in d7/TermTest:
I guess that is fine because it's just test data?
Otherwise looks like no traces left.
Comment #24
larowlanYeah, I agree this can be marked done.
There's a reference to forum_containers in the variables table but on it's own that does nothing.
There's also some terms from a 'forum' vocabulary that are migrated but they're migrated as terms - because that's what they are.
There's no special handling for the fact the vocab is called forum in the taxonomy module.