Problem/Motivation
Introduced in #2613924: Link text isn't marked as required
LinkWidget assumes that method ->get() exists on the field definition.
However, that method only exists for configurable fields.
Should use getName instead.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2937889-link-fix-pass.patch | 3.11 KB | larowlan |
| #3 | 2937889-fail.patch | 2.4 KB | larowlan |
Comments
Comment #2
larowlanworking on fix
Comment #3
larowlanFailing test
Comment #4
larowlanFix
Comment #5
sam152 commentedSo
::getexits onFieldConfigInterfaceinherited fromConfigEntityInterface::get, which has nothing to do withBaseFieldDefinitions, fix makes sense to me.Checked out the docblock on
FieldDefinitionInterface::getName:Which is pretty much the exact scenario in the widget, creating a selector to the form element, which matches the access scheme of the entity. The config based implementation is also defined as:
So seems like the correct fix to me and a very low risk change.
Comment #7
larowlanComment #9
xjmCommitted to 8.5.x. Thanks!
Comment #10
berdirDidn't take the status :)
Comment #12
xjm@larowlan pointed out that for some reason I forgot to commit this to 8.6.x first. Fixed now!