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.
It would be nice if this was compatible with Panels. I have also tried to use the rendered field in Panels, with a view mode setting this field, but that didn't work either.
Comments
Comment #1
yannickooOkay, seems to be an issue with Field formatter settings API because Image class module also has that problem (#1928926: Panels).
Comment #2
yannickooIt seems that additional field formatter settings are not appearing in Panels.
This has been reported for Linked Field and Image class module (#1928926: Panels).
Let us find out what we can do that they also appear in Panels :)
Comment #3
Alan D. CreditAttribution: Alan D. commentedThe root module is actually CTools that provides the content_type plugins.
I haven't tried, but it would probably be trivial to invoke the non-existent field hooks there and get the additional settings added. Someone would just have to convince Earl that this is a worthwhile feature....
Cross post: #1589814: Is hook_form_alter possible for field formatter forms?
Comment #4
Alan D. CreditAttribution: Alan D. commentedMarked #1832018: Empty fields integration with Panels as a duplicate
Comment #5
Dave ReidOr if we know what form we can alter, we can invoke it in Field formatter settings ourselves.
Comment #6
yannickooI would move this to the Ctools issue queue because they should alter the Field Formatter Settings because this is also needed for D8.
We have to add the
drupal_alter
in the ctools_fields_get_field_formatter_settings_form function.Comment #7
Lukas von BlarerI referred from #2020445: Not available in panelizer. I also have this issue with Panelizer and therefore also with Panels. This were my findings:
Why is field_multiple_limit working? What does it do differently?
Comment #8
Lukas von Blarerfield_injector has got the same issue.
Comment #9
Lukas von BlarerHow do I have to call drupal_alter() in there? Can we use a alter hook that already exists? Or do we have to introduce a new one?
Comment #10
WorldFallz CreditAttribution: WorldFallz commentedi just stumbled across this as a result of empty_fields not working with panels. I'm happy to roll a patch, and tried the suggestion in #6, but it doesn't seem to have any effect.
anyone have a work around any idea where I should start for a patch?
Comment #11
Dave ReidLet's try this patch.
Comment #12
Dave ReidAnyone able to review and test this?
Comment #13
WorldFallz CreditAttribution: WorldFallz commentedyep... just forgot to post back. The options appear, though the ajax show/hide seems to be broken-- at least for empty_fields settings. Also, the actual empty_fields settings don't seem to be actually having any effect. I'm thinking both of those issues likely belpong to empty_fields, but I don't have any other field settings altering modules install to test. know of any good candidates I should test?
Comment #14
mate2 CreditAttribution: mate2 commentedi've tried the patch from #11 with empty_fields (7.x-2.0) and panels (7.x-2.0) module
and now i can edit the empty display options at formatter styles, but not for all field types.
edit works for: entity reference field, date field.
but edit form is not displayed for: term reference field, long text field, Long text and summary field.
therefore i set the "Empty display options" in admin/structure/types/manage/content/display and via panel ui, but i can't see any empty fields.
i've not installed Panelizer.
Comment #15
JKingsnorth CreditAttribution: JKingsnorth commentedI wonder if this is also related / duplicate? #2152405: ctools_fields_get_field_formatter_settings_form() not fully compatible to field_ui
Comment #16
Alan D. CreditAttribution: Alan D. commentedThe patch probably fails in some cases, as prior to the alter, many fields will not have a form, as the alter creates the only available fields. Does not fully explain results from #14 though :(
Comment #17
magicmyth CreditAttribution: magicmyth commentedThe patch from #1928054-11: Field formatter settings with CTool content_type entity_field plugin (Panels integration) does partly solve the specific issue of allowing modifications of the Field UI formatter setting form from other modules but is slightly miss-placed. It will fail on formatters that have no settings by default but gained settings from other modules. I've attached a patch that fixes this.
Note that the patch is solving the specific issue of CTools not allowing field formatter setting forms to be altered. Accessing the stored field values is IMHO a separate issue as I imagine most modules depend on looking up the field instance settings based on entity view mode which will not work with something like CTools because the field settings are not stored that way. I've provided a solution for the module Field Formatter Class #2227133: Make CTools compatible with hook_field_attach_view_alter() which might be the kind of solution other modules can use?
Comment #18
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedno longer applies cleanly to the latest dev version (8/22/14)
Comment #19
magicmyth CreditAttribution: magicmyth commented@SocialNicheGuru I just checked the patch against both dev and git and it applied just fine. Are you sure you do not have any other patches applied that may conflict?
Comment #20
DYdave CreditAttribution: DYdave commentedHi guys,
I would like to confirm that I have just applied the patch from #17 cleanly, without any problem against ctools-7.x-1.x at ae66d65.
Additionally, I would like to mention the patch seems to work as expected and appears to provide support for the integration between ctools and Field formatter settings, thus fixing the issue #2329895: Display Suit Dynamic fields: Integration between Grid Field Formatter (based on Field formatter settings) and Display Suite (Panels/ctools based dialogs and forms).
For more details, see referencing issue #2329895: Display Suit Dynamic fields.
Thanks very much to all for posting this issue and the corresponding patch.
Cheers!
Comment #21
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedit does apply cleanly and brand new install. sorry for the noise.
Comment #24
Lukas von BlarerWorks for me as well.
Comment #25
mrjmd CreditAttribution: mrjmd commentedHere's a re-roll with a spelling fix.
Comment #26
yannickooCool, thanks mrjmd :) I tested that patch and Linked Field seems to work inside a view when adding a new field.
Comment #27
travisc CreditAttribution: travisc commentedany chance of getting this into 1.6?
Comment #28
mrjmd CreditAttribution: mrjmd commentedComment #29
mrjmd CreditAttribution: mrjmd commentedDiscussed this with jappery, it looks like the alter should happen inside of the if ($settings_form) as in #11. The version I rerolled based on #17 would product weird results if $settings_form came back NULL.
Here's a new patch.
Comment #30
yannickooMakes sense :)
Comment #31
japerryThat looks better! Fixed.