Download & Extend

Allow mockup field settings in ctools_field_invoke_field()

Project:Chaos tool suite (ctools)
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:major
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Patch allows adding a dummy field settings.

AttachmentSizeStatusTest resultOperations
ctools-fields-mock-field.patch1.27 KBIdlePASSED: [[SimpleTest]]: [MySQL] 58 pass(es).View details

Comments

#1

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

#2

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.

#3

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 :)

#4

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

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

#5

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
1707810-ctools-fields-mock-field-5.patch1.4 KBIdlePASSED: [[SimpleTest]]: [MySQL] 67 pass(es).View details

#6

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?

#7

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

AttachmentSizeStatusTest resultOperations
1707810-ctools-fields-mock-field-7.patch1.28 KBIdlePASSED: [[SimpleTest]]: [MySQL] 67 pass(es).View details

#8

Gentle bump :)

#9

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

#10

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.

#11

Priority:normal» major

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

#12

Status:reviewed & tested by the community» fixed

Committed and pushed!

#13

Status:fixed» closed (fixed)

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

nobody click here