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.
Problem/Motivation
comment_form_field_ui_field_storage_edit_form_alter() is supposed to limit comment fields to cardinality 1, but it's no longer working
Proposed resolution
fix it
Remaining tasks
everything
User interface changes
none
API changes
none
Beta phase evaluation
Issue category | Bug because UX regression |
---|---|
Issue priority | Normal because not really broken without it, but prevents mega-weirdness |
Prioritized changes | The main goal of this issue is usability. This is a prioritized change for the beta phase. |
Disruption | None |
Comment | File | Size | Author |
---|---|---|---|
#14 | Selection_008.png | 21.39 KB | rpayanm |
#12 | Selection_007.png | 21.24 KB | rpayanm |
#9 | comment-alter-2399307.7.patch | 2.44 KB | larowlan |
#9 | interdiff.txt | 1.43 KB | larowlan |
#6 | comment-alter-2399307.pass_.patch | 2.02 KB | larowlan |
Comments
Comment #1
larowlanComment #2
larowlanComment #3
SteffenRBy working on this issue, i found another "issue" with the latest 8.0.x.
I'm not sure, if i misconfigured my page after installation - but i don't get any Comment types - even if i create new types on Structure > Comment Types.
Attached you find a patch setting cardinality_container back to be not visible as they were before.
SteffenR
Comment #4
SteffenRComment #5
SteffenRComment #6
larowlanShould be red/green
Comment #8
Berdirnot sure why we change #options instead of changing #default_value?
Would it make sense to also verify that the created field has cardinality 1, or are we already doing this?
Comment #9
larowlanSure
Comment #10
BerdirThanks, RTBC if green :)
Comment #11
larowlanAdded beta evaluation
Comment #12
rpayanmHello, I don't get any Comment types when I apply the last patch, this behavior is well?
Comment #13
BerdirThat's a separate issue. You're trying to add a comment field to users, you need to create a comment type for that first.
Comment #14
rpayanm@Berdir You are right!
Comment #15
pwolanin CreditAttribution: pwolanin commentedIs there really no way a field item can declare it only supports cardinality one? I was looking earlier, and it's certainly not evident how it would work.
Comment #16
larowlanMenu UI wants something similar so opened #2403703: Allow field types to enforce the cardinality - see #2315773: Create a menu link field type/widget/formatter
Comment #17
alexpottCommitted 7a52a88 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the summary.