Closed (fixed)
Project:
Rules
Version:
7.x-2.x-dev
Component:
Module Integrations
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2013 at 12:54 UTC
Updated:
14 Aug 2013 at 18:31 UTC
Related to #2045847: The provided argument for parameter is empty.
The SOAP spec requires that optional (NULL) values be allowed. For wsclient to work with rules module, this requires a modification to the implementation of hook_rules_data_info(). Example hook_rules_data_info below where I've added the 'allow null' parameter to Address2, Phone and Fax. If this change isn't implemented, then an exception gets thrown by rules.core.inc, ~ line 893
throw new RulesEvaluationException('The provided argument for parameter %name is empty.', array('%name' => $name), $this);
Example
function hook_rules_data_info() {
$items = array();
$items["billingAddress"] = array(
"type" => "wsclient_account_services_BillingAddress",
"label" => "billingAddress",
"property info" => array(
"Address1" => array(
"type" => "text",
"label" => "Address1",
),
"Address2" => array(
"type" => "text",
"label" => "Address2",
"allow null" => TRUE,
),
"State" => array(
"type" => "text",
"label" => "State",
),
"Postcode" => array(
"type" => "text",
"label" => "Postcode",
),
"PhoneNumber" => array(
"type" => "text",
"label" => "PhoneNumber",
"allow null" => TRUE,
),
"FaxNumber" => array(
"type" => "text",
"label" => "FaxNumber",
"allow null" => TRUE,
),
),
);
return $items;
}| Comment | File | Size | Author |
|---|---|---|---|
| rules-allowNullParametersFromData.patch | 1.23 KB | heddn |
Comments
Comment #0.0
heddnUpdated issue summary.
Comment #1
fagoWhile that's not a documented entity-property-info key, I think it's ok to add support for this optional key.
Thanks, committed.
Comment #2
heddn@fago, I don't see the commit on this. Did I miss it in the logs?
Comment #3
fagoIndeed - sry I pushed it to the wrong repo. Here it is now: http://drupalcode.org/project/rules.git/commit/700282c
Comment #4.0
(not verified) commentedUpdated issue summary.