I've set up several sign-up content types and created a few dozen nodes.
When I visit the admin page at admin/content/signup I get the following messages:
Notice: Undefined property: stdClass::$language in _signup_date_get_node_scheduler() (line 112 of [...]/sites/all/modules/signup/includes/date.inc).
Warning: array_push() [function.array-push]: First argument should be an array in date_formatter_format() (line 450 of [...]/sites/all/modules/date/date.module).
The first message goes away if I change the second line of code in _signup_date_get_node_scheduler as follows:
if (!empty($node->{$field['field_name']}[isset($node->language)?$node->language:'und'][0]['value'])) {
I don't know if this is related: in this admin listing page, all nodes are showing up as closed for signup, although they are actually all open (and signing up works). Only one of the nodes is in a content that has a date field, which has been set to be used by signup; the other nodes don't have any date field.
Using the latest Drupal 7.2 and Date 7.x-2.0-alpha3.
Comments
Comment #1
jwilson3The $node->language field *should* be set, for all fully loaded nodes.
So I had to track down through many undocumented function calls, back to
signup_admin_form_sql, which was not pulling the language field.Adding the field to the query was enough to get rid of this error message.
Comment #2
jwilson3The second error message in the OP, may be covered by the patch in #1112590: Small fixes in the date.inc file.
Comment #3
geert commentedThe change removes indeed the error. Thanks for the work.
Comment #4
Hardik C commentedComment #5
Hardik C commentedComment #6
jwilson3@Hardik C:
Thanks, but I already referred to that same patch in #2. Its not necessary to attach it also to this issue, which targets another issue completely.
Comment #7
sgabe commentedThe patch in #1 though doesn't apply, fixes the issue.
Note that you should always create patches against the project root so we don't need to exclude the unnecessary path segments. I am attaching the same patch with the correct project path.
Comment #8
sgabe commentedCommitted, thanks!