I'm using the Field Formatter Class module and it would be nice to have the core DS fields (the ones that show up when you select a layout) to allow other modules to alter the "field's" settings. Maybe just adding them somehow to the list when field_info_instance_settings() is called might be appropriate?

I'll also mention that we're seeing some some weird warnings if using DS core fields: #1616426: Compatibility with Display Suite

The only other issue I could find that might somewhat resemble this issue: #1867828: Conditions on Display Suite fields are not behaving nicely + obsolete saving of field settings

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swentel’s picture

Hmm interesting, never used one of those field formatter modules on DS fields, besides field formatter conditions, which I maintain myself and where I had to write some workaround code for it.

Getting DS fields into field_info_instance_settings() is as good as impossible as I can't turn DS fields into 'real' Field API fields - at least, not in this stage without having a nearly impossible upgrade path.

However, I'll investigate as we'll probably start using more and more of those modules that depend on field formatter settings api.

markhalliwell’s picture

Ok, not entirely sure, but took a crack at it. Let me know if this patch makes sense, it did to me. If DS is calling field_formatter_settings_summary() when viewing a specific view mode, shouldn't that view mode's name be used in instance settings instead of just plain ol' default?

markhalliwell’s picture

Never mind, that just silences the error.

Gyver06’s picture

FileSize
150.25 KB

Unfortunately, your patch doesn't solve the problem.
I tested it and no luck. Error still present.
See the joined capture screen.

swentel’s picture

Status: Active » Closed (duplicate)

I'm going to mark this one duplicate as I think we have a better patch over at #1900014: Field formatter settings summary alter implementations choke on DS Pseudo fields which probably solves this completely.

markhalliwell’s picture

Status: Closed (duplicate) » Active

Actually that doesn't solve this issue. It would silence the errors, but the settings are actually never pulled in when configuring the formatter. It just passes an empty array. I'm not sure they would get saved either, now that I think about it.

mansspams’s picture

Please see #1992948: Make DS leaner by outsourcing field formatting features as it could be related and could serve as higher level initiative for good changes.

markhalliwell’s picture

Fixed this in the Linked Field module (see related issue), which essentially does the same thing.

markhalliwell’s picture

Project: Display Suite » Field Formatter Class
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: Field UI » Code

I suppose that means this is really a Field Formatter Class issue then.