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
In the field admin interface, plugins are listed by weight but this weight is not used when calling the format callbacks because they are called by the alphabetical order of the plugins names. It works perfecttly with the given plugins because, magic, their names follow their weights (except for the organization one). This can lead to issues when using custom plugins to alter some fields (even if you don't want us to do this, we need to).
Proposed resolution
Use plugins weights instead of alphabetical order.
Comment | File | Size | Author |
---|---|---|---|
#1 | addressfield-use_plugin_weight_in_addressfield_generate-2325411-1.patch | 872 bytes | DuaelFr |
Comments
Comment #1
DuaelFrThis patch have no side effet.
Comment #2
jkuma CreditAttribution: jkuma commentedLooks good to me, I update it to RTBC.
Comment #3
bojanz CreditAttribution: bojanz commentedI had issues getting the patch to work, so I pushed a simpler version:
http://cgit.drupalcode.org/addressfield/commit/?id=2a338c9
Please test and let me know if you encounter any issues.
Comment #5
DuaelFrThank you Bojan.
I can't remember why I made it so complicated. I'd need to reinstall that project to make some tests but I don't think I'll have enough time for this on the next few weeks. I'll keep it in my inbox as a reminder, though.
Comment #6
bojanz CreditAttribution: bojanz commented