Patch allows adding a dummy field settings.

Files: 
CommentFileSizeAuthor
#7 1707810-ctools-fields-mock-field-7.patch1.28 KBamitaibu
PASSED: [[SimpleTest]]: [MySQL] 67 pass(es).
[ View ]
#5 1707810-ctools-fields-mock-field-5.patch1.4 KBamitaibu
PASSED: [[SimpleTest]]: [MySQL] 67 pass(es).
[ View ]
ctools-fields-mock-field.patch1.27 KBamitaibu
PASSED: [[SimpleTest]]: [MySQL] 58 pass(es).
[ View ]

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
StatusFileSize
new1.4 KB
PASSED: [[SimpleTest]]: [MySQL] 67 pass(es).
[ View ]
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

StatusFileSize
new1.28 KB
PASSED: [[SimpleTest]]: [MySQL] 67 pass(es).
[ View ]

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.

axel.rutz’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.

axel.rutz’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.