With the attached rule set enabled on a VBO view two warnings are raised.
Warning: implode(): Invalid arguments passed in RulesDataUIListText::inputForm() (line 347 of /vagrant/repos/dennis_distro/profiles/dennis_distro/modules/contrib/rules/ui/ui.data.inc).
Warning: implode(): Invalid arguments passed in RulesDataUIListInteger::inputForm() (line 376 of /vagrant/repos/dennis_distro/profiles/dennis_distro/modules/contrib/rules/ui/ui.data.inc).
Wouldn't it be sensible to provide the taxonomy select form that we see in the direct input of the rules admin ui rather than a ID input field?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1194268_Using_rule_sets_with_views_bulk.patch | 1.24 KB | Ravi.J |
| #1 | tag_nodes.txt | 1.16 KB | jamiecuthill |
Comments
Comment #1
jamiecuthill commentedComment #2
Ravi.J commentedI have been able to identify the root cause of the error and how to replicate it.
The above issue only seems to happen with Ruleset components that have variable of data type "List of taxonomy term items".
i have been able to reproduce the error by following the below steps
1. Create a new component
2. Choose ruleset from component type of list
3. Setup two variables, the first one setup with data "content" and second one of data type " List of taxonomy term items".
4. Go on and finish setting up the rule set
5. Go back to rulesets list screen and click execute, you should now see php warning
Looking into the code further, i found that inputForm() ,methods within rules ui core expect $settings to have a list of values where as in case of list of data type "List of taxonomy term items" , it gets NULL.
There seem to be three seperate issues
1. When a ruleset is executed Rules UI displays a text field for input instead of a select list with drop down items to select from.
2. Rules UI classes receive NULL values instead of list of terms that result in PHP warnings when imploded for displaying default values.
3. All inputForm methods of RulesUI class should check if values being received through $settings variable is not empty before trying to use implode function.
Attached is patch that fixes the 3rd point from above, As a result input form does not show PHP warnings anymore, however the other two important issues listed above still remain.
Comment #3
fagoThanks, I've removed the unnecessary parentheses and committed the patch.
>Wouldn't it be sensible to provide the taxonomy select form that we see in the direct input of the rules admin ui rather than a ID input field?
Yep, let's handle that in a separate issue. Feel free to open one.
Comment #4
fagoComment #6
mitchell commentedUpdated component.