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.
When generating comments, devel_generate appears to ignore the content-type comment settings.
In particular, devel_generate seems always to generated threaded comments even when the node-type is set to flat comments.
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedIt does do that in the DB, but if you have your site set to not display threads then it should not matter. They are always presented as flat
Comment #2
thsutton CreditAttribution: thsutton commentedYeah, but then the comments will be displayed in threaded order (according to the comments in the database), but in non-threaded style (according to the settings for the node/type).
Comment #3
salvisThe content type comment setting is the Display Mode. Comments themselves are neither threaded nor flat. It all depends on the display mode.
Do you mean devel_generate should create only comments (in the narrow sense of the term, i.e. comments attached to the node) rather than comments and replies?
I'm not sure what devel_generate does, but website users are certainly free to create (root) comments as well as replies, no matter what the display mode is.
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedI think the issue is that we add comments to node types that have comments disabled. the discussion of threaded vs. flat seems to be a red herring.
Comment #5
moshe weitzman CreditAttribution: moshe weitzman commentedfixed on 7
Comment #6
moshe weitzman CreditAttribution: moshe weitzman commentedfixed in 6 as well