I'm mystified.
I wanted to write a relationship plugin to provide a particular context on a panel page, and I wanted the relationship criteria to be configurable so that I could re-use the plugin in other scenarios, so I needed to include a form.
The 'settings form' property is used throughout the ctools plugins code and documentation. The advanced_help documentation describes it; the ctools_plugin_example module implements it; and loads of ctools plugins implement it too.
Given all this, I'm struggling to imagine that it doesn't do anything... but -- in Panels, at least -- none of the 'settings form' forms seem have any effect whatsoever. I subsequently tested every example plugin that I could attach to a panel, and none of their settings forms had any effect on the configuration form for the plugin.
I was going in circles trying to get 'settings form' to work for my relationship plugin, and when I finally traced the code to _ctools_plugin_configure_create_form_info()
I learned that the only properties that are actually looked for are 'edit form', 'add form', and 'default form'; none of which are mentioned at all in the documentation for relationship plugins; nor in the docs for any other plugin other than content type plugins.
I implemented 'edit form' and a submit handler in my relationship plugin, and everything is working perfectly.
What am I missing here?
Comments
Comment #2
jweowu CreditAttribution: jweowu commentedComment #3
MustangGB CreditAttribution: MustangGB commentedComment #4
jweowu CreditAttribution: jweowu at Catalyst IT commentedHi MustangGB. Could you quantify that closure for me please? How is the issue outdated?
For instance, https://git.drupalcode.org/project/ctools/-/blob/7.x-1.x/ctools_plugin_e... still specifies a 'settings form' so it's still used in the code.
Does the property now do something?
_ctools_plugin_configure_create_form_info()
in https://git.drupalcode.org/project/ctools/-/blob/7.x-1.x/includes/plugin... still doesn't look for it.At a glance, it's unclear to me how this issue has been solved.