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
Steps to reproduce:
- Install brightcove module
- Install inline entity form
- Create a reference field from videos to brightcove entities
- Use IEF for that field as widget
- Note: You could also try to use brightcove together with the media module.
Problem
IEF doesn't use form classes but rather just leverages entity form displays, therefore any logic encoded inside the custom form classes of the brightcove module don't work.
One obvious example is the default reference ID.
Proposed resolution
Let's use a default value callback for it instead.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#4 | 2731915-4.patch | 3.76 KB | dawehner |
#4 | interdiff.txt | 1.86 KB | dawehner |
#2 | 2731915-2.patch | 4.2 KB | dawehner |
Comments
Comment #2
dawehnerThere we go.
Comment #3
yce CreditAttribution: yce at Pronovix for BrightCove commentedPlease check you code again, you would prevent the Video upload by adding this condition for BrightcoveVideo::save() method:
if (FALSE && $upload) {...}
.Also please use
static::class
orself::class
instead of the get_called_class() method.Comment #4
dawehnerThank you for the review!
I always forgot about it, even it is really really nice! Thank you for bringing up this point.
Ups, yeah that was just a temporary workaround, damnit, this really should have not landed in the patch.
Comment #5
dawehnerFriendly ping :)
Comment #7
yce CreditAttribution: yce at Pronovix for BrightCove commentedThanks! It's looking good, commited.
Comment #8
yce CreditAttribution: yce at Pronovix for BrightCove commentedComment #9
dawehnerThank you a lot.
@yce
Just a quick comment regarding how to deal with issues. When you just mark something as fixed it appears in the tracker of other people. Once an issue was fixed for 2 weeks it'll be closed automatically. When you set it to closed (fixed) it vanishes directly from the tracker of other people.
Comment #10
yce CreditAttribution: yce at Pronovix for BrightCove commentedI see, okay, thanks for letting me know!