Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In my views section for the fullcalendar, as well when I click the calendar link, I am getting the following errors:
Warning: Invalid argument supplied for foreach() in element_children() (line 6134 of /data/12/1/33/48/1196048/user/1274238/htdocs/tcsite/includes/common.inc).
Warning: Cannot use a scalar value as an array in drupal_render() (line 5622 of /data/12/1/33/48/1196048/user/1274238/htdocs/tcsite/includes/common.inc).
Warning: Cannot use a scalar value as an array in drupal_render() (line 5677 of /data/12/1/33/48/1196048/user/1274238/htdocs/tcsite/includes/common.inc).
Warning: Invalid argument supplied for foreach() in element_children() (line 6134 of /data/12/1/33/48/1196048/user/1274238/htdocs/tcsite/includes/common.inc).
Warning: Cannot use a scalar value as an array in drupal_render() (line 5622 of /data/12/1/33/48/1196048/user/1274238/htdocs/tcsite/includes/common.inc).
Warning: Cannot use a scalar value as an array in drupal_render() (line 5677 of /data/12/1/33/48/1196048/user/1274238/htdocs/tcsite/includes/common.inc).
Is this a calendar issue or views?? What could be causing this error?
Comment | File | Size | Author |
---|---|---|---|
#15 | Fullcalendar-screen.png | 74.31 KB | pkchoo |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedViews and ctools version?
Comment #2
breeze76 CreditAttribution: breeze76 commentedI have both modules installed, but this error is in the views section when doing the settings for the calendar.
Comment #3
aspilicious CreditAttribution: aspilicious commentedYeah I know you installed both but what is the current version of those modules that you're using? alpha? beta? release candidate?
Comment #4
breeze76 CreditAttribution: breeze76 commentedctools: 7.x-1.x-dev
views: 7.x-3.x-dev
Comment #5
blasthaus CreditAttribution: blasthaus commentedstumbled upon this post, but you may try to insert this debug code before line 6134 inside the element_children function in common.inc
to see what is calling the function
I might note that i resolved a similar issue with this function while in a Views admin screen and traced it to my own code.
A side note to that is if you are using an admin theme with no 'node.tpl.php' file, Drupal will pull that out of /modules/node
and in a few cases there are render statements there without any conditional, so if you are altering values in places like links
or comments, you should be aware of that.
Comment #6
breeze76 CreditAttribution: breeze76 commentedI tried inserting the code above, but get an error on it... here is the error:
Fatal error: Call to undefined function dsm() in /data/12/1/33/48/1196048/user/1274238/htdocs/tcsite/includes/common.inc on line 6138
Line 6138 is: dsm(views_trace());
Anything else?? I appreciate your help... This is one of the last two issues I need to get fixed...
Comment #7
tim.plunkett@breeze76: dsm is from devel.module. If you're debugging a module, it is indispensible, which is why @blasthaus assumed you had it.
Comment #8
breeze76 CreditAttribution: breeze76 commentedOK.. so, such I install it in order to try to debug this issue?
Comment #9
aspilicious CreditAttribution: aspilicious commentedYes
Comment #10
breeze76 CreditAttribution: breeze76 commentedOK install the devel module and get this info:
The first part is displayed over and over as well as the second part.. I am not sure what I am looking at... any help please...
Comment #11
aspilicious CreditAttribution: aspilicious commentedCan you try latest fullcalendar dev code? (it needs the "colors module" and update.php to upgrade)
Comment #12
tim.plunkettComment #13
breeze76 CreditAttribution: breeze76 commentedI added the color module and updated to the latest dev version and ran update.php, still get the same error....
Comment #14
aspilicious CreditAttribution: aspilicious commentedARe you still struggeling with this :s
Comment #15
pkchoo CreditAttribution: pkchoo commentedI'm actually experiencing this issue and I updated to the latest dev version 7.x-2.x-dev and ran update.php... no luck. I am currently working on the site locally so I can't show it yet. Any ideas on how this could be remedied?
Thank you,
Joe
Comment #16
itismejoshy CreditAttribution: itismejoshy commentedsame issue here.....stumped...
Comment #17
tim.plunkettIf someone can provide steps to reproduce, please reopen.
Comment #18
Urza9814 CreditAttribution: Urza9814 commentedI'm having the exact same bug. Empty drupal install, put in several modules, but I currently have ctools 7.x-1.0-rc1, date 7.x-2.0-rc1 and FullCalendar 7.x-2.0-beta2
Interestingly, I wasn't able to set up fullcalendar as described in the docs -- When I go to add a date object to the view field, there isn't any. So instead I added the google calendar module, and added the following calendar:
https://www.google.com/calendar/feeds/spark.progress%40gmail.com/public/...
The events on the calendar show up fine, but I get the same series of error messages.
For right now, I went into views_handler_field.inc (in modules/views/handlers) and added the following code to the very top of 'function advanced_render($values)', right at line 948:
That's stopped the errors, and I'm not noticing any issues with it...though I realize it's a rather poor fix, and I should really be following that $values array all the way up to see WHY it's created as the value '1' sometimes rather than an array...
Comment #19
aspilicious CreditAttribution: aspilicious commentedMarking active again. Probably caused by the gcal handling.
Btw: you can't find any date fields if you didn't create one. You should add one first to the content type you would like to show.
Comment #20
Urza9814 CreditAttribution: Urza9814 commentedJust a note for anyone else dealing with this: I've discovered that the solution I posted above screws up other parts of the views module. A better alternative is just to insert the return at line 5597 of includes/common.inc -- so you end up with:
[code]
function drupal_render(&$elements) {
if(!is_array($elements))
return;
[/code]
Comment #21
aspilicious CreditAttribution: aspilicious commentedThe new ajax patch is going to fix this. It's under development these days so be patient :) and you'll be rewarded.
Comment #22
tim.plunkettPostponing this on the contextual filters patch. We'll see if this still is a problem after that.
Comment #23
assolsv CreditAttribution: assolsv commentedI have the issue as well
Notice : Undefined index: grouping dans views_plugin_style->render() (ligne 232 dans /var/<removed>/httpdocs/sites/all/modules/views/plugins/views_plugin_style.inc).
Not sure it's related though... Maybe a version mismatch between Views and FullCalendar? If so, how can I fix this?
Thanks a lot and best regards.
Comment #24
tim.plunkett@assolsv Views is now stable, you should definitely update.
Comment #25
assolsv CreditAttribution: assolsv commentedTim,
You mean to 7.x-3.1 ?
I did a modules update check and it's not suggested... Trying to (force) install http://ftp.drupal.org/files/projects/views-7.x-3.1.tar.gz doesn't work and it states that Views is already installed.
Shall I de-install Views and install the latest ?
Thanks and best regards-
Comment #26
assolsv CreditAttribution: assolsv commentedJust an update to my previous post.
Actually, today I checked for updates on my Drupal site and Views was showing in the list of modules to update (it was not the case last week). Maybe some dependencies issues were addressed meanwhile?
Anyway, now after update my Views is at 7.x-3.1 and it fixed the issue.
All fine.
Thanks a lot!
Comment #27
tim.plunkettGlad to hear it!