Download & Extend

code error which causes adding new condition to not do anything when user clicks on "Continue" green button

Project:Rules
Version:7.x-2.2
Component:Rules Core
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Problem: in the "Add a new condition" form page, when I click on the "Continue" green button, it doesn't do anything.

I see the following 2 entries in the Recent log message:

Referrer: http://myserver.com/admin/config/workflow/rules/reaction/manage/rules_te...
Message: Notice: Undefined index: properties in RulesData::addSiteMetadata() (line 620 of /mydrupal/sites/all/modules/rules/includes/rules.state.inc).

Referrer: http://myserver.com/admin/config/workflow/rules/reaction/manage/rules_te...
Message: Invalid form POST data.

So upon debugging rules.state.inc, I determined that $site_info['properties'] is unset. So I added a check before that line:

if ( isset ( $site_info['properties'] ) )
$property_info['properties'] += $site_info['properties'];

and that fixed the problem; now when I click on the "Continue" green button, it shows me additional configuration stuff.

AttachmentSizeStatusTest resultOperations
Screen shot 2012-09-22 at 9.08.26 PM.png15.27 KBIgnored: Check issue status.NoneNone

Comments

#1

I'm not sure this is the right fix. Looking at the code it looks like $property_info is the main object being operated on here, and it's supposed to be getting passed in by the caller. Whatever's calling it in this instance is failing to pass it in correctly, and that's where the fix needs to happen...

#2

I can confirm this, and your fix also fixed this issue i got #1842012: AJAX returns parsererror - I cannot use this module

#3

I had this same issue on the AJAX returns parsererror thread, and here's a patch that should work against 7.x-2.2

AttachmentSizeStatusTest resultOperations
rules.state_.inc-ajax-error.patch673 bytesIgnored: Check issue status.NoneNone

#4

JustDave may be right.

I was running the UUID module, and its current released version has a bug (fixed in dev) that clobbers the property info information for _all_ of your modules. Once hook_entity_property_info_alter is called, you are hosed.

Arguably Rules should check its input better, but this is why the patch sort of works, but not quite.

#5

I have same problem with Rules and AJAX. Unfortunately, patch from #3 didn't work for me.
Site I am working on might have had UUID installed in the past, but I am not sure.
Any ideas how to debug it further? Can IIS be a problem here too?

#6

Thanks! that work for me!

#7

Hi,

patch for me also worked to get rid of my ajax error when trying to add the action "Set data value"

Thanks!

#8

I disabled the patch again because the ajax dynamic drop down selector to select a variable didn't appear anymore...
Now I unistalled the UUID module and everything is working again.

#9

Thank you, it works for me.

nobody click here