Is this maybe a regression caused by the splitting up of entity links per view mode?
I'm sure before there was a default for this.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2165363-6.flag_.new-flag-default-entity-links.patch | 2.85 KB | joachim |
| #3 | flag-fix_new_flag_default_view_mode-2165363-3.patch | 668 bytes | shabana.navas |
Comments
Comment #1
shabana.navas commentedIf you mean the default values for the 'Display in entity links' checkboxes, yeah, they did have defaults before. In 7.x-2.x, for something like adding a flag to a node, we had the display in teaser and full view modes selected by default. In 7.x-3.x, none of the default view modes are checked by default.
Comment #2
joachim commentedYup, that's exactly what I mean.
Sorry for the brief summary; I was in the middle of working on another issue and happened to spot this in passing.
Comment #3
shabana.navas commentedHow about checking the first view mode for every entity by default if it is a new flag?
Comment #4
joachim commentedThanks!
This is a good start, but I'd like to have node flags have the 'teaser' as default too. Also, now I've taken a closer look it's probably better to work with the $defaults variable that is being built up before the form element is defined rather than add logic inside that.
And lastly, I'm going to write some tests for defaults on new forms.
Comment #5
joachim commentedComment #6
joachim commentedArgh, I meant to change the current() to reset(), since current() AFAIK could give you a different item in the array depending on what's been done to it previously, so seems a bit more brittle to me.
Comment #7
shabana.navas commentedWorks perfectly.
Comment #8
joachim commentedThanks for the review :)