0

A website that has a workflow system based on Rules, as detailed here

Some of the rules use the condition 'User has role(s)', and all these rules now show the following error:

Error: Data selector site:current-user for parameter account is invalid.

The condition must have been valid when it was created, or the rule would not have been saved.

The site uses Entity API 7.x-1.0-rc3 and Rules 7.x-2.2.

Any suggestions? Even deleting and recreating the rule does not work, as I cannot seem to find site-current-user in the Data Selector dropdown.

  • try clearing your cache once – why Feb 8 '13 at 6:16
  • I have already tried this. It doesn't help. – user13667 Feb 8 '13 at 6:17
  • well..if possible try reinstalling the modules but i guess it will hamper your other work...let me check – why Feb 8 '13 at 6:19
  • Try upgrading entity to latest version. – David Thomas Feb 8 '13 at 6:28
  • Entity and Rules are already at the latest recommended versions. Company policy forbids me from installing the development releases. – user13667 Feb 8 '13 at 6:31
1

The problem was with the UUID module. Updating it to the latest version fixed this issue.

Similar problem at: Enabling UUID breaks rules config set by Ubercart.

0

The error:

Data selector %selector for parameter %name is invalid.

usually happens when specific parameter is not available at given time.

This is the condition which throws the error (rules.core.inc):

// ...
elseif (!empty($this->settings[$name . ':select']) && !$this->applyDataSelector($this->settings[$name . ':select'])) {
  throw new RulesIntegrityException(t("Data selector %selector for parameter %name is invalid.", array('%selector' => $this->settings[$name . ':select'], '%name' => $name)), array($this, 'parameter', $name));
}

and usually it happens, because the parent token is not listed in $this->availableVariables() as per code below:

public function applyDataSelector($selector) {
  $parts = explode(':', str_replace('-', '_', $selector), 2);
  if (($vars = $this->availableVariables()) && isset($vars[$parts[0]]['type'])) {
    $wrapper = rules_wrap_data(NULL, $vars[$parts[0]], TRUE);
    // ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.