Patch allows adding a dummy field settings.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amitaibu’s picture

OG is also going to use it, see screenshot of sub-widgets in #1730678: Provide a "complex" widget instead of "Primary" and "Secondary" fields.

merlinofchaos’s picture

Status: Needs review » Needs work

This patch only populates $field if $field_name is an array. That seems like it could lead to errors in other use cases.

amitaibu’s picture

This patch only populates $field if $field_name is an array.

The reasons are:

  1. I didn't want to change the function signature
  2. Assuming you need a mocked field, then anyway you'll need to load it and add your own settings

What other solution do you prefer?

That seems like it could lead to errors in other use cases.

All i know is that atleast my current use case(s) for OG and OG-vocab, which creates "sub-widgets" is actually working really nicely thanks to how cool CTools and Field API are :)

amitaibu’s picture

This patch only populates $field if $field_name is an array.

Re-read, and you are of course correct, ignore #3, patch coming soon :)

amitaibu’s picture

Status: Needs work » Needs review
FileSize
1.4 KB
amitaibu’s picture

Hi guys, OG vocab 7.x-1.x is now using it as-well. Any chance getting this in soon, so testbot won't fail all my tests?

amitaibu’s picture

How many mistakes can I make in 3 line patch :/

amitaibu’s picture

Gentle bump :)

skyredwang’s picture

tested #7 patch. didn't see anything wrong.

geek-merlin’s picture

Status: Needs review » Reviewed & tested by the community

reviewed code and can confirm it should do what it says and not harm previous code flow.

so ready to fly.

geek-merlin’s picture

Priority: Normal » Major

rising prio as this blocks a stable release of og_vocab as of #6.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.