API page: https://api.drupal.org/api/drupal/includes%21common.inc/7.x

Enter a descriptive title (above) relating to common.inc, then describe the problem you have found:

Warning: Invalid argument supplied for foreach() in element_children() /includes/common.inc
Warning: Illegal string offset '#children' in drupal_render() /includes/common.inc
Warning: Illegal string offset '#printed' in drupal_render() /includes/common.inc

I'm looking up issues for this warning and am finding that it occurs in many instances, many modules, many configurations, dating as far back as 2012. Could this not be module related but a problem in the common.inc file or how that file interacts with modules?

If you search this warning you get it related to numerous modules such as:
File Field Paths
Field Collections
MegaDrupal
Custom themes
Acquia Content Hub
Navbar region
Certificate
webform hints
commerce reports
feeds
strongarm
entity rultes
recruiter
features plumber
...and more!

I don't know how to begin troubleshooting this, but this has been around for a very long time, with just as many fixes. It seems that each instance has a fix for that use rather than a broad root solution. Is there a solution to fix it?

Comments

kappaluppa created an issue. See original summary.

ronino’s picture

I sometimes encounter these errors, too, and the simple patch in #2884171: The drupal_render() function could use a bit more protection fixes them for me.

mustanggb’s picture

Status: Active » Closed (duplicate)
quietone’s picture

Issue tags: -includes\common.inc