Contact-Integration: Invalid argument supplied for foreach()

margaridacarvalho - October 24, 2009 - 14:43
Project:Chaos tool suite
Version:6.x-1.2
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community
Description

(I'm not sure if this is the right place to post my problem, so if it isn't I'm sorry and please tell me where to do it)

When I add an existing node to a panel-pane (using panels3 latest release) the content shows but I get this error at the top of the page

warning: Invalid argument supplied for foreach() in /Users/margaridacarvalho/mysites/clisb/sites/all/modules/ctools/plugins/content_types/node/node.inc on line 46.

AttachmentSize
Picture 1.png83.24 KB

#1

3dloco - October 30, 2009 - 02:19

Hello Margaridacarvalho

I was also getting the exact same error using 6.x-1.2 with Panels 6.x-3.2 and managed to fix it after updating the Variants->Selection Rules.

In my case I was using panels (contact_site) to add company address and telephone number to the bottom of the site-wide contact form (instead of the default option which only allows text at the top of the form).

After updating (re-selecting) the Selection Rules (so both anonymous and authenticated users can view the page) the error got fixed. I had selected these rules at the beginning, but somehow re-selecting them fixed the issue.

Hope this helps.

#2

pimsn - November 18, 2009 - 14:43

Hey there,
I'm having the exact same problem. I'm using D 6.14 - CTS 1.2. I have an existing node and a view added to my contact_site-page. I don't even have any selection rules, and my permissions should be OK. I even tried to add selection rules for the panel-page, but dropped this attempt because there was only a selection rule for logged in users. (am I missing something there...?)

I dont get this fixed... :(

#3

shelly80504 - December 3, 2009 - 15:31

I'm also having the exact same problem. I'm using D 6.14 - CTS 1.2. I have an existing node that I've added to my contact_site-page. I have tried updating my selection rules (as previously suggested by "3dloco") but like "pimsn" mentions (see previous comments) there is only a selection rule for logged in users. This is very frustrating.

#4

dereine - December 7, 2009 - 14:39
Status:active» needs review

The problem, is that this can be cause by serveral reasons.
For the contact one, its the wrong parameter for the function ctools_..._render

AttachmentSize
ctools-fix_contact.patch 554 bytes

#5

3dloco - December 7, 2009 - 23:54

Hello,

This error came back after flushing the caches and would go away after updating the selection rules.

After applying the patch above (had to do it manually due to some file not found errors when patching) the error is gone and the view with the contact form is now ok.

Thanks Dereine!

KH

#6

dereine - December 8, 2009 - 07:35

@3dloco

So its rtbc?

#7

3dloco - December 8, 2009 - 22:33

Yes, I can confirm that the error is gone and has not comeback..Thanks!

#8

dereine - December 8, 2009 - 23:00
Title:Invalid argument supplied for foreach()» Contact-Integration: Invalid argument supplied for foreach()
Status:needs review» reviewed & tested by the community

Thanks.

 
 

Drupal is a registered trademark of Dries Buytaert.