When I upload images to a gallery, whether I have PLUpload enabled or not, I get the following warnings:

Warning: Invalid argument supplied for foreach() in element_children() (line 6300 of /Users/blahblah/Development/Sites/ashraenac/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 5767 of /Users/blahblah/Development/Sites/ashraenac/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 5777 of /Users/blahblah/Development/Sites/ashraenac/includes/common.inc).
Warning: Illegal string offset '#children' in drupal_render() (line 5815 of /Users/blahblah/Development/Sites/ashraenac/includes/common.inc).
Warning: Illegal string offset '#printed' in drupal_render() (line 5822 of /Users/blahblah/Development/Sites/ashraenac/includes/common.inc).

If I upload 3 images, I get these 5 warnings 3 times. If I upload 10 images, I see 50 lines of warnings. My site's going live next week and I would hate for my content creators to get this every time. (I know it's a beta version.)

Any idea on how to fix this?

Thanks!

Comments

Moloc’s picture

Status:Active» Postponed (maintainer needs more info)

When exactly do you get the error?
- In the upload dialog?
- While / After uploading?
- When upload is finished - on the main site?

Do you also get this error, when you refresh the page, which contains the error?

Do you also get this error, when you upload images at /admin/content/media ?

It seems, that this issue is not easy to reproduce.
Some similar issues:
#1630032: Illegal string offset warnings when taking quiz
#1764884: theming_example_page() doesn't demonstrate theming
#1711256: Enabling disabled modules causes error: Invalid argument supplied to element_children()

What verison of php do you use?

David_Rothstein’s picture

Don't know about the error itself, but this:

My site's going live next week and I would hate for my content creators to get this every time.

can be dealt with simply by turning off on-screen error reporting (see the launch checklist at http://drupal.org/node/1076460).

ksignorini’s picture

The error flashes briefly inside the media upload dialog box, then the dialog disappears and the error is shown at the top of the gallery page (my Help region). The gallery works fine after upload, it's just that I see the warnings every time.

PHP is 5.4.4 I believe, running on a MAMP setup.

When I refresh the page, the error text goes away.

I will have to try changing the upload location and see what happens.

Thanks.

ksignorini’s picture

Thanks re: error reporting.

lsolesen’s picture

@ksignorini Can you supply more info after testing?