A function 'addressfield_field_formatter_settings_form' is declared in 'addressfield' module.
It isn't intended to implement hook_field_formatter_settings_form in this module.
Therefore, when I use this module and addressfield module, an error is happen.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

zroger’s picture

Project: Formatter Field » Address Field
Version: 7.x-1.0-beta2 » 7.x-1.x-dev

This is an issue with addressfield accidentally implementing a hook. Moving to that issue queue.

helior’s picture

It seems as though $items[$delta] in formatter_field_field_widget_form() references the *previously* selected "Field to be formatted", which I'm guessing is causing incorrect data getting passed into it, and thus PHP notices of missing array keys (often in the settings array). This can be tested with any field module that implements formatter settings.

helior’s picture

Title: addressfield_field_formatter_settings_form » Incorrect values getting passed into invocation of hook_field_formatter_settings_form() in formatter_field_field_widget_form()
Project: Address Field » Formatter Field

Moving issue back into Formatter Field.

zipymonkey’s picture

Status: Active » Needs review
FileSize
598 bytes

Thanks for the feedback @helior. Here is a simple patch that grabs the default field formatter settings.

zipymonkey’s picture

There is an issue with patch in #4 when creating new nodes. The patch found here seems to fix this: http://drupal.org/node/1762202#comment-6482248

There is a new patch that combines both.

zipymonkey’s picture

Issue summary: View changes

particular in this module

vlad.dancer’s picture

Issue summary: View changes
Status: Needs review » Needs work

I've came from #1762202-2: Field value(s) reset when a field with unlimited values gets added a new value in the node edit form.. And it seems that http://drupal.org/node/1762202#comment-6482248 fixes bug. This patch doesn't allow save field settings for Default value setting, the setting alway still seted with default value, not with my.

There is one note for bug reproducing, in my case I had warnings only when creating bean, not on the edit form (also I have 7.x-1.0-beta3 version of the formatter_field).

Chris Matthews’s picture