Notice: Undefined index: attributes_start in theme_date_display_range() (line 253 of /var/www/sites/learning-tv.com/sites/all/modules/contrib/date/date.theme).
    Notice: Undefined index: attributes_end in theme_date_display_range() (line 254 of /var/www/sites/learning-tv.com/sites/all/modules/contrib/date/date.theme).
    Recoverable fatal error: Argument 1 passed to drupal_attributes() must be an array, null given, called in /var/www/sites/learning-tv.com/sites/all/modules/contrib/date/date.theme on line 258 and defined in drupal_attributes() (line 2262 of /var/www/sites/learning-tv.com/includes/common.inc).

I have added a date field to the user entity.

In users where the repeating date element are blank, no error occurs. In a user where this data has been filled in, the above error is provoked.

I can remove the error by changing lines 253 and 254 in date.theme to:

$attributes_start = (isset($vars['attributes_start']))? $vars['attributes_start'] : array();
$attributes_end = (isset($vars['attributes_end']))? $vars['attributes_end'] : array();

But a look at the $vars variable shows that these keys in fact do not exist. Instead there is an 'attributes' key, but it is empty in my particular instance.

CommentFileSizeAuthor
#5 fix_user_fatal_error.patch905 byteskarens

Comments

jmaties’s picture

same error!!

MathRo’s picture

I goted the same error before I clear my cache.
With some "drush cc all" this error disapeared, then I saw others problems but it might be from my custom module ^^

karens’s picture

I can replicate a fatal error. I need to debug this.

karens’s picture

The fatal error I get in the latest code is different, it is: "Fatal error: Cannot create references to/from string offsets nor overloaded objects in .../includes/form.inc on line 2140"

I have a fix figured out. Before committing it I need to go back to the issue about altering the Date Repeat UX to be sure it will still work with that patch.

karens’s picture

StatusFileSize
new905 bytes

The patch needed is the following. I'm going to hold off on applying it because it is interfering with the changes at #1354606: Date Repeat user interface improvements, and perhaps is not needed with that patch.

karens’s picture

Status: Active » Needs work
karens’s picture

Status: Needs work » Fixed

OK, I have committed the repeat UI fixes and still have a fatal error with repeating dates on users and the above patch still works to fix it, so committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.