Within a Rule Actions I defined "Set a data value" actions for some Fields inside of Other Fields Collection of a Node.
After i deleted the fields, I get some errors and i can't delete those actions.

1. For the Rules list:
Error: Data selector node:field-collection:field-subfield for parameter data is invalid.

2. The Rule Edit page, same error but for every "Set a data value" action, deleted field related
Error: Data selector node:field-collection:field-subfield for parameter data is invalid.

3. Try to delete action,
- i confirm the Delete and it continue to says:
Unable to delete the action as some of its provided variables are utilized by the action Set a data value.

Maybe it's a general issue about deleting fields and the rules related with them.

CommentFileSizeAuthor
#7 rules_event_fix.patch11.91 KBfago
#2 rules_fix_configs.patch3.11 KBfago
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vasike’s picture

I also can't clone or export/import stuff of the rule

Integrity check for the imported configuratoin failed. Error message: Data selector <em class="placeholder">node:field-collection:field-subfield</em> for parameter <em class="placeholder">data</em> is invalid..
fago’s picture

Title: Errors for Delete Fields (Collection) » allow fixing broken configurations
Status: Active » Needs review
Issue tags: +D7 stable release blocker
FileSize
3.11 KB

uhm, yep. that's a rather weird problem currently. Could you try whether the attached patch works for you?

fago’s picture

With the patch you should be able to delete broken stuff.

vasike’s picture

Status: Needs review » Reviewed & tested by the community

the patch does its work. i was able to delete the rules with broken config.

i also by mistake i tried first the #1029600-6: Disable rule has wrong confirmation text patch which also allow me to do this, in case that info will help you.

fago’s picture

Status: Reviewed & tested by the community » Needs review

You missed the R in RTBC.. ;) Also, I doubt the patch from #1029600-6: Disable rule has wrong confirmation text solves it.

The patch touches removing rule elements and events, so we that's what we need to test:
a) to work now for a broken rules config
b) to still work for working configs
c) to still throw validation errors for working configs

fago’s picture

Status: Needs review » Needs work

This still sucks.

It's inconsistent to be able to delete anything because it would break your rule, but once it broken you can suddenly do everything. So let's do it better:

* Allow the user *always* to do everything-
* If the rule is not broken, warn the user before he's breaking a rule on the confirmation screen.

fago’s picture

Status: Needs work » Needs review
FileSize
11.91 KB

ok, implemented that. See attached patch.

It also improves some messages related when adding/remove event.

fago’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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

mitchell’s picture

Component: Miscellaneous » Rules Core

Updated component.