After upgrading to 7.x-2.0-rc1 (and then also the dev release from soon after) I get an internal server error when editing rules. This happens on 2 different sites on 2 different servers. One server gave the usual Internal Server Error, the other gives "No data received Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.".

Downgrading to the latest beta resolves this. Export of my rule is below, its incomplete because that's as far as I get creating the rule before I get the error.

{ "rules_rules_email_yahoo_group" : {
    "LABEL" : "Email Yahoo group when new post is added to the front page",
    "PLUGIN" : "reaction rule",
    "REQUIRES" : [ "rules" ],
    "ON" : [ "node_insert" ],
    "IF" : [
      { "node_is_of_type" : { "node" : [ "node" ], "type" : { "value" : { "article" : "article" } } } }
    ],
    "DO" : []
  }
}
CommentFileSizeAuthor
#32 rules_500_fix.patch950 bytesfago

Comments

jared12’s picture

I am having the same problem.

I got everything set up locally and it worked fine, but once it was online I got the 500 error when I tried to edit the rules.

The problem is inconsistent though. At first I was able to edit some of the rules, but not others. So I deleted a "bad" rule and remade it and then I could edit it. When I tried to change the order of the conditions, it broke again.

When I gave up last night I wasn't able to edit any of the rules. When I sat down this morning, I could edit all of them ... until I tried making changes.

I was still trying to ascertain if the problem was with my transfer to the web, my web host, the Rules module or some other update, so thanks for posting this temporary solution mstrelan. With the beta version in place everything seems rock solid again.

itserich’s picture

I tried installing RC1 yesterday and was unable to do much.

Setting up a simple Rule with just an Event and a Condition, then trying to Edit it, would time out. No visible error message, simply a blank page.

Reverting to the last Beta 3 seems to work for me, thanks!

http://drupal.org/node/190124/release

minneapolisdan’s picture

Same here, subscribe

cateye’s picture

I confirm the same problem.

ciniko’s picture

Assigned: Unassigned » ciniko

same issue here, any help will be much appreciated...

knalstaaf’s picture

Subscribing.

dodgecandle’s picture

same here

BeaPower’s picture

will there be a release with a fix?

jibize’s picture

Same problem here with a fresh install of Drupal 7.7 with Entity API 7.x-1.x-dev or 7.x-1.0-beta10, when trying to add a condition to a rule I get a

502 Bad Gateway

I'm on a Barracuda server. When downgrading to rules 7.x-2.0-beta3 evrything works fine.

Buckminster_Bond’s picture

Having the same issue. (But my server was give HTTP Error 500)

Downgrading as #9 also worked for me.

Nasty little knock on for me was the core.xxxxxx files were being created and store under public_html - these crippled the site.
(Something to watch out for if you are getting this problem...)

Two of the rules causing the problem...

{ "rules_redirect_to_regisrtation_page_wh" : {
    "LABEL" : "Redirect to regisrtation page when creating content",
    "PLUGIN" : "reaction rule",
    "ACTIVE" : false,
    "REQUIRES" : [ "rules" ],
    "ON" : [ "node_insert" ],
    "IF" : [
      { "user_has_role" : {
          "account" : [ "site:current-user" ],
          "roles" : { "value" : { "1" : "1", "2" : "2", "4" : "4", "5" : "5" } },
          "operation" : "OR"
        }
      }
    ],
    "DO" : [ { "redirect" : { "url" : "user" } } ]
  }
}

and

{ "rules_put_nid_into_field_download_code" : {
    "LABEL" : "Put NID into Field Download Code",
    "PLUGIN" : "reaction rule",
    "REQUIRES" : [ "rules" ],
    "ON" : [ "node_insert" ],
    "IF" : [
      { "node_is_of_type" : {
          "node" : [ "node" ],
          "type" : { "value" : { "mobile_friendly_page" : "mobile_friendly_page" } }
        }
      }
    ],
    "DO" : []
  }
}
owntheweb’s picture

Version: 7.x-2.x-dev » 7.x-2.0-rc1

I'm having the same issue with 7.x-2.0-rc1. :(

If I save a new rule after saving a node or before saving a node: Everything is fine. If I add a condition of content is type, I get the internal server error message after saving.

If I update to the dev version with fresh dev files (no updates seem required when calling update.php either), same issue.

Thanks for the assist in advance. :)

meabbasi’s picture

Subscribing

carsonw’s picture

Subscribe

christelle41’s picture

The same issue with the last 7.x-2.x-dev release. It only works with the last Beta 3...

ldweeks’s picture

sub

bkno’s picture

I'm getting this too, my server says "502 Bad Gateway" when trying to edit a rule. Sept 8th dev version.

narayanis’s picture

I reported this issue as a 502 error in the Barracuda queue, but it looks like it's not a BOA-specific thing at this point. sub.

cha0s’s picture

Same here, using 7.x-2.0-rc1. Only happens on the remote server. I haven't been able to get a look at the log (if any) yet to be able to provide more details. Will post it if/when I'm able to gt that extra information.

I'm also going to try my first git bisect, I'll post back if I can get anything meaningful out of that. The pain is, it only happens on the remote server...

sheila8stamp’s picture

subscribe

benmalen’s picture

sub

Argus’s picture

Subcribe. 502 when trying to edit a rule.

leewoodman’s picture

subscribe

Argus’s picture

Component: Rules Core » Miscellaneous
Status: Closed (fixed) » Active
Issue tags: -D7 stable release blocker

Small update, the 502-error was there initially, but disappeared a little later. And now it seems to work fine. Strange behavior.

narayanis’s picture

Keep an eye out. The next time you run drush cc all, it will likely come back; that's been my experience anyway.

leewoodman’s picture

worked for me as well, is it something to do with only Logintabogan rules causing this error?

fago’s picture

adding tag

longwave’s picture

#10 notes that core dumps were created, so this is probably the same as #1205834: Segmentation Fault

Presuming these reports are all segfaults, they may only occur in specific versions of PHP.

fago’s picture

I've tried to reproduce this with the rule-exports provided, but so far no luck! :(

So looks like the error depends on a certain environment. Could you please provide the PHP and Drupal version you are experiencing the issue with? Then, please test whether the error applies to a clean install only having entity+rules installed.

Also, what are exact steps to reproduce?
- Create new rule
- Add condition
- That's it?

Thanks!

fago’s picture

Also, please report if you are using any PHP extensions (apc, xdebug, ..)

Buckminster_Bond’s picture

System info for #10 - Cheers!

Apache version 2.2.17
PHP version 5.2.17
MySQL version 5.1.56
Architecture x86_64
Operating system linux
Shared IP Address 175.107.146.137
Path to sendmail /usr/sbin/sendmail
Path to Perl /usr/bin/perl
Perl version 5.8.8

mstrelan’s picture

Configure for the first server mentioned in the OP

Apache version unknown
PHP Version 5.2.17
MySQL version 5.1.56
Architecture x86_64
Drupal version 7.7

'./configure' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zend-multibyte' '--enable-zip' '--prefix=/usr' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mm=/opt/mm/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-ttf' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'

@fago - would it help if someone was able to PM you access to their server? Unfortunately I'm not able to for the sites that servers I have access to, but somebody else may be able to.

fago’s picture

Status: Active » Needs review
StatusFileSize
new950 bytes

mh86 was able to reproduce it on his local development environment and helped to identify the source (thanks!)

It seems that a simple method_exists() check triggers a PHP bug, probably another incarnation of https://bugs.php.net/bug.php?id=51425

Please try whether removing the check fixes the problem (see patch attached).

@fago - would it help if someone was able to PM you access to their server? Unfortunately I'm not able to for the sites that servers I have access to, but somebody else may be able to.

Thanks, but looks like we found the source already :)

Status: Needs review » Needs work

The last submitted patch, rules_500_fix.patch, failed testing.

mstrelan’s picture

#32 fixes the problem for me. I guess an alternative would be to just wrap call_user_func in a try/catch statement, that way if method_exists() fails it fails silently.

ncameron’s picture

seconded, 32 worked for me

arsura2’s picture

I confirm, #32 worked for me.

jared12’s picture

#32 seems to have solved the problem for me, as well. Thanks!

fago’s picture

Status: Needs work » Fixed

ok, I've added a comment to it and committed #32.

Status: Fixed » Closed (fixed)

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

dafeder’s picture

In case anyone thinks they are still having this error after the fix committed above, make sure to check an issue with Entity that is easily confusable with this one: #1518062: Latest DEV cause segmentation fault in drush.

mitchell’s picture

Component: Miscellaneous » Rules Core

Updated component.

pthornhi6’s picture

I had the same problem. Couldn't edit or clone and rule that had a redirect in it. I was using Rules 7.x-2.6. I went back to rules 7.x-2.0-beta3 and all is well.

mctwist’s picture

I was getting an Internal Server Error when trying to add a condition for an Ubercart action (customer completes checkout). I wanted to add a condition that the order included a specific product. I would get the error UNLESS I first included a "Entity Includes Field" condition.

Hope this helps someone.

Status: Active » Closed (fixed)
mattbk’s picture

@mctwist #43: Can you clarify what you entered for Entity and Field? I'm a little confused by the "Entity has Field" screen.

Thanks!

Emilio13’s picture

Component: Miscellaneous » Rules Core
Issue summary: View changes

I had the same problem. I was using Rules 7.x-2.6.

cshema’s picture

When I am trying to edit the following rule , I get Segmentation Fault.

The configuration in which the problem is occurring is:
Drupal core : 7.31
Rules : 2.7
Php Version : 5.2.6

When the rules module is reverted to version rules-2.0-beta3, I am able to edit the rules.

Rule :
 "rules_testrule3" : {
    "LABEL" : "testrule3",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "comment" ],
    "ON" : { "comment_view--comment_node_ads" : { "bundle" : "comment_node_ads" } },
    "IF" : [
      { "text_matches" : { "text" : [ "comment:subject" ], "match" : "YYY" } },
      { "text_matches" : { "text" : [ "comment:subject" ], "match" : "YYY" } },
      { "text_matches" : { "text" : [ "comment:subject" ], "match" : "YYY" } }
    ],
    "DO" : [  ]
  }
}
cshema’s picture

Status: Closed (fixed) » Active

Seems a number of people are experiencing an issue here.

cshema’s picture

After upgrading the rules module to 7.x-2.x-dev development version (PHP version 5.2.6, Drupal Core 7.31), I am able to edit the existing rules. I am also able to specify multiple OR conditions in a single rule and everything is working fine. So it looks like the current development version fixes this issue.

cshema’s picture

Status: Active » Closed (fixed)
brad.bulger’s picture

i couldn't trace the exact problem, but i suspect that it may be something about PHP 5.2 vs later versions. Rules 2.7 works without problems on a system running PHP 5.3, but on the PHP 5.2 system, it dies trying to call the buildContent() method on a RulesAbstractPluginUI object.

installing 2.x-dev fixes the problem for me as well.

kossumov’s picture

disabling Extendable Object Faces API module solved it for me