If I try to use the FormAPI date element from a custom module or profile.module, I get:

* notice: Array to string conversion in .\includes\form.inc on line 882.
* notice: Undefined index: #children in .\includes\form.inc on line 1254.

and the element is not expanded to the 3 select controls as expected.

With FAPI3, the #process property no longer supports parameters (see: http://drupal.org/node/144132#custom-params)

The 'date' entry in system_elements() was not updated for this change ('checkboxes' and 'radios' were)

Patch attached to fix this

Comments

Rok Žlender’s picture

Status: Needs review » Reviewed & tested by the community

Issue http://drupal.org/node/159494 has been marked as a duplicate of this one.

I tested the patch and now the date field works. Simpletest tests of profile module which uses date field are now green.

Rok Žlender’s picture

StatusFileSize
new1020 bytes

Patch from assimonds still applies but with
Hunk #1 succeeded at 115 with fuzz 1 (offset 5 lines).

Rerolled and it now applies cleanly.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)