Step to reproduce:
- set 2 date fields, one with repeating events
- select the one that is not repeating as the reminder reference
- create a node, set 2 occurrences of the repeating date field
- in view mode, WSOD with the title message.

Note that the reminder setting in the content type refuses to take the right choice, it falls back to the repeating date.

Comments

dwillcox’s picture

Very, very odd. date_create_from_format() is a PHP function, so how would it be undefined? And that particular call (in _datereminder_get_occurance_after_date()) is fairly fundamental to DateRemidner. Maybe there's a bad argument? I'll have to play with this.

In the meantime, before I can get to this, could you say what were the type of date fields? Datestamp, datetime, etc.? It may make a difference. I don't know.

I suppose it could be related to "Note that the reminder setting in the content type refuses to take the right choice..." might have something to do with it, though it's also just possible the form default value just isn't getting set correctly.

dwillcox’s picture

Also, could you check your php version? Apparently date_create_from_format() 5.3.0 or later.

This isn't a new installation, is it? Has Date Reminder worked for other types on this same installation?

Sorry if these seem obvious questions, but I don't understand how you could get this error.

dwillcox’s picture

Re:

Note that the reminder setting in the content type refuses to take the right choice, it falls back to the repeating date.

That turned out to be a simple typo in a variable name. The form wasn't proper setting the previous value as the default.

dwillcox’s picture

Step to reproduce:
- set 2 date fields, one with repeating events
- select the one that is not repeating as the reminder reference
- create a node, set 2 occurrences of the repeating date field
- in view mode, WSOD with the title message.

I tried that. I couldn't reproduce the error. Could you verify the php version? And what version of php is on your previous site when we were investigating an earlier issue?

dwillcox’s picture

Release 6.x-1.1-beta1, when it appears, should have a fix for the default datefield problem. It also has a requirement for php 5.3 to ensure that date_create_from_format(). (There also should be a -dev version sometime on 10.4.)

dwillcox’s picture

Status: Active » Postponed (maintainer needs more info)
dwillcox’s picture

Assigned: Unassigned » dwillcox
jvieille’s picture

Thanks you for taking care.
PHP version is 5.2.17 - so the date_create_from_format() should fail. Any way to have this module compatible with php 5.2 which is still largely in use
my date fields are of the "Date" type

dwillcox’s picture

OK, so we know what the problem is. Unfortunately, I didn't realize that this was a 5.3-only function when I used it, and I don't know if there's an equivalent functionality for 5.2. Will have to do some research.

jvieille’s picture

Thanks

dwillcox’s picture

It looks like probably date_create() (php 5.2) will work for what it needs to work for. I'll experiment tonight.

Something's weird about git and drupal, though. My commits aren't showing up on the project page. Nor the 1.1-beta1 release I created last night.

dwillcox’s picture

Status: Postponed (maintainer needs more info) » Needs review

This should be fixed in 1.1-beta2, which for some reason isn't showing up on the project page, but you can find it by clicking "View All Releases."

I'd appreciate it if you'd try that and verify that it fixes your issue.

jvieille’s picture

Status: Needs review » Closed (fixed)

Seems ok now
I put it in production.

dwillcox’s picture

Thanks. If it didn't instantly blow up under php 5.2, it should be OK. I was lucky. It turned out that, except for having to add '@' for datestamps, date_create() automatically handles all of the existing formats, so the explicit format from date_create_from_format() wasn't necessary.