Closed (fixed)
Project:
Rules Forms Support
Version:
7.x-1.x-dev
Component:
Rules
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2012 at 09:11 UTC
Updated:
1 Apr 2016 at 20:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
FranckV commentedSame issue here... annoying
Comment #2
Yanxi commentedSame here.
Comment #3
thekevinday commentedI had the same problem, please try the attached patch.
The problem is that an object is also stored on the form and the code tries to append a class object onto something else.
Comment #4
thekevinday commentedComment #5
andypostSuppose better to convert $data to array
Comment #6
Refineo commentedPatch in #5 tested successfully. It removes the error.
Comment #7
tobiberlinHi
reopening this issue as the error message still appears although the path was already used in the module.
Best,
Tobias
Comment #8
tobiberlinok... it seems that this message does just appear after just activating the rules form support for a form. Now when I open the form again the message does not appear anymore. However: although my module version had this patch already fixed the message appeared in my new installation.
Additionally I do not see any information about the form elements from form element inspection tool?!
Comment #9
kardave commentedHi,
I only have this error, when I enable the "Enable form element inspection tool" option. The first option (Enable event activation messages on forms) doesn't raise error.
David
Comment #10
kardave commentedPatch in #5 dissolved the error in my case :)
Thanks!
Comment #11
c-logemannI just tested the 7.x-2.x-dev branch where I didn't find the feature "inspection tool" and I can't apply the patch.
But in 7.x-1.x-dev branch the patch #5 is solving this issue and I can use the "inspection tool".
Comment #12
nwom commentedHad the same problem. Thanks for the patch.
Comment #13
dooug commentedre-rolled for latest 7.x-1.x-dev. Worked for me.
Comment #14
therobyouknow commentedGood news - patch in #13 worked for me too but I needed to edit the email header and tail first to be able to use the patch.
See my terminal log below, before and after and showing the dates of my rules_forms files if that helps you and how (and where I applied the patch):
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ wget https://drupal.org/files/rules_forms-recoverable_fatal_error-1542280-13....
--2013-09-20 12:32:40-- https://drupal.org/files/rules_forms-recoverable_fatal_error-1542280-13....
Resolving drupal.org (drupal.org)... 140.211.10.62, 140.211.10.16
Connecting to drupal.org (drupal.org)|140.211.10.62|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 846 [text/plain]
Saving to: ‘rules_forms-recoverable_fatal_error-1542280-13.patch’
100%[=============================================================================>] 846 --.-K/s in 0s
2013-09-20 12:32:42 (96.3 MB/s) - ‘rules_forms-recoverable_fatal_error-1542280-13.patch’ saved [846/846]
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ ls
CHANGELOG.txt README.txt rules_forms.install rules_forms.rules.inc
includes rules_forms.css rules_forms.module rules_forms.test
LICENSE.txt rules_forms.info rules_forms-recoverable_fatal_error-1542280-13.patch
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ ls -l
total 108
-rw-rw-rw- 1 root root 2814 Feb 22 2012 CHANGELOG.txt
drwxrwxrwx 2 root root 4096 Sep 19 12:01 includes
-rw-rw-rw- 1 root root 18092 Sep 17 2011 LICENSE.txt
-rw-rw-rw- 1 root root 5318 Feb 22 2012 README.txt
-rw-rw-rw- 1 root root 1670 Feb 22 2012 rules_forms.css
-rw-rw-rw- 1 root root 385 Feb 22 2012 rules_forms.info
-rwxrwxrwx 1 root root 1535 Feb 22 2012 rules_forms.install
-rwxrwxrwx 1 root root 16327 Feb 22 2012 rules_forms.module
-rw-r--r-- 1 robd www-data 846 Sep 17 02:50 rules_forms-recoverable_fatal_error-1542280-13.patch
-rwxrwxrwx 1 root root 16662 Feb 22 2012 rules_forms.rules.inc
-rw-rw-rw- 1 root root 19921 Feb 22 2012 rules_forms.test
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ cat rules_forms-recoverable_fatal_error-1542280-13.patch
From 90fd71f4fa8ecf5a80448f9718a6aaa0fd874e7e Mon Sep 17 00:00:00 2001
From: dooug
Date: Mon, 16 Sep 2013 21:49:09 -0400
Subject: [PATCH] Issue #1542280: fixes 'recoverable fatal error' when adding
a form for rules_forms.
---
rules_forms.module | 3 +++
1 file changed, 3 insertions(+)
diff --git a/rules_forms.module b/rules_forms.module
index 854c2a3..3b3a205 100755
--- a/rules_forms.module
+++ b/rules_forms.module
@@ -387,6 +387,9 @@ function rules_forms_add_popups(&$form, $elements) {
* to demonstrate the structure of an array to the user.
*/
function _rules_forms_display_info(&$element, $data, $level = 1, $delta = NULL) {
+ if (is_object($data)) {
+ $data = (array) $data;
+ }
if (is_array($data) && $level != 3) {
$element .= $delta;
$element .= '
';
--
1.7.9.5
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ ls
CHANGELOG.txt LICENSE.txt rules_forms.css rules_forms.install rules_forms-recoverable_fatal_error-1542280-13.patch rules_forms.test
includes README.txt rules_forms.info rules_forms.module rules_forms.rules.inc
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ cp rules_forms-recoverable_fatal_error-1542280-13.patch rules_forms-recoverable_fatal_error-1542280-13.patch.orig
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ ls
CHANGELOG.txt LICENSE.txt rules_forms.css rules_forms.install rules_forms-recoverable_fatal_error-1542280-13.patch rules_forms.rules.inc
includes README.txt rules_forms.info rules_forms.module rules_forms-recoverable_fatal_error-1542280-13.patch.orig rules_forms.test
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ vi rules_forms-recoverable_fatal_error-1542280-13.patch
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ vi rules_forms-recoverable_fatal_error-1542280-13.patch
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ vi rules_forms-recoverable_fatal_error-1542280-13.patch
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ patch < rules_forms-recoverable_fatal_error-1542280-13.patch
patching file rules_forms.module
Hunk #1 succeeded at 368 (offset -19 lines).
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$ cat rules_forms-recoverable_fatal_error-1542280-13.patch
--- a/rules_forms.module
+++ b/rules_forms.module
@@ -387,6 +387,9 @@ function rules_forms_add_popups(&$form, $elements) {
* to demonstrate the structure of an array to the user.
*/
function _rules_forms_display_info(&$element, $data, $level = 1, $delta = NULL) {
+ if (is_object($data)) {
+ $data = (array) $data;
+ }
if (is_array($data) && $level != 3) {
$element .= $delta;
$element .= '
';
robd@DevWeb:/var/www/go-on/rob/sites/all/modules/rules_forms$
Comment #15
maximpodorov commentedChances to commit?
Comment #16
c-logemannI think currently not. There is no active maintainer. The information "looking for a co-maintainer" is also some years old. Maybe somebody will pay for development?
By myself I really like the idea of this module and when I find the time to get deeper involved I will ask for maintainership.
There is a a big complexity already in the current two 7.x branches and I believe also 8.x will bring some more complexity. So even if I start to get involved maybe I will start only with 8.x and if I will support 7.x I will make a decision for only one of the 7.x branches.
Comment #17
kenorb commentedThe patch in #13 looks like workaround, so I think we need to first understand why we've got object instead of array and if this is expected behaviour.
Somebody needs to provide some backtrace why this is happening and how we can fix it in a proper way.
Comment #18
kenorb commentedComment #19
caminadaf commentedThis happens because on node forms we have the '#node' element, which has the loaded object of the node.
I conditioned the code so that #node and #entity elements don't go through _rules_forms_display_info, but also kept the patch #13 to prevent any possible errors.
Comment #21
caminadaf commentedCommited on 7.x-1.x-dev