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.
This is part bug report, part feature request.
Scald's sub module atom_reference moves the element to a key "sid" inside the returned array.
That means that there are no #entity_type, #field_name or #bundle keys on the element returned by atom_reference's widget form callback, resulting in some nasty notices (and MVW to not work).
The attached patch "fixes" this by introducing yet another special case (in addition to entity reference). Not a beauty, but it gets the job done.
Comment | File | Size | Author |
---|---|---|---|
#4 | multiple_value_widget-refactor_for_total_coverage-2298633-4.patch | 9.23 KB | stefanos.petrakis@gmail.com |
scald-missing-index-notice.patch | 901 bytes | ciss | |
Comments
Comment #1
ciss CreditAttribution: ciss commentedComment #2
Chi CreditAttribution: Chi commentedCan we find a way to support any contrib module? Do we have to hardcode support for each one?
Comment #3
ciss CreditAttribution: ciss commentedI've already begun to heavily rewrite/restructure the module. One of the changes is that the theme registry no longer needs to be altered. hook_field_attach_form() is used instead to add the necessary information and overwrite the #theme key.
If you like you can add me as a maintainer with VCS access and I'll push a new feature branch as soon as I've found the time to clean up and comment the new code.
Comment #4
stefanos.petrakis@gmail.comIt's been a while.
Here is an attempt at refactoring, in order to make it more generic. And more slender.
I mean to add some tests for this, in the meantime, if you could have a look and see if it solves the scald issue,
I checked and both node and entity reference work correctly.