Download & Extend

Contact-Integration: Invalid argument supplied for foreach()

Project:Chaos tool suite (ctools)
Version:6.x-1.2
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

(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

Comments

#1

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

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

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

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

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

@3dloco

So its rtbc?

#7

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

#8

Title:Invalid argument supplied for foreach()» Contact-Integration: Invalid argument supplied for foreach()
Status:needs review» reviewed & tested by the community

Thanks.

#9

hi dereine,

using D 6.15, i've tried pasting the following code from your patch:

   ctools_include('context');
   ctools_include('context-task-handler');
-  $output = ctools_context_handler_render($task, '', array(), '');
+  $output = ctools_context_handler_render($task, '', array(), array());
   if ($output !== FALSE) {
     return $output;
   }

into the top of: ...ctools/page_manager/plugins/tasks/contact_site.inc, and nothing happens.

I've played around with several selection rules (as well as "none") + flushing the caches, and nothing seems to make the error go away.

Also, I am using two different contact forms on the same panel page (a "get quote" form, and a "say hello" form side by side in diff columns). Not sure if that will make any difference.

Any other suggestions?

#10

Status:reviewed & tested by the community» needs work

^bump^

nobody click here