Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
dwillcox CreditAttribution: dwillcox commentedVery, 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.
Comment #2
dwillcox CreditAttribution: dwillcox commentedAlso, 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.
Comment #3
dwillcox CreditAttribution: dwillcox commentedRe:
That turned out to be a simple typo in a variable name. The form wasn't proper setting the previous value as the default.
Comment #4
dwillcox CreditAttribution: dwillcox commentedI 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?
Comment #5
dwillcox CreditAttribution: dwillcox commentedRelease 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.)
Comment #6
dwillcox CreditAttribution: dwillcox commentedComment #7
dwillcox CreditAttribution: dwillcox commentedComment #8
jvieille CreditAttribution: jvieille commentedThanks 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
Comment #9
dwillcox CreditAttribution: dwillcox commentedOK, 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.
Comment #10
jvieille CreditAttribution: jvieille commentedThanks
Comment #11
dwillcox CreditAttribution: dwillcox commentedIt 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.
Comment #12
dwillcox CreditAttribution: dwillcox commentedThis 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.
Comment #13
jvieille CreditAttribution: jvieille commentedSeems ok now
I put it in production.
Comment #14
dwillcox CreditAttribution: dwillcox commentedThanks. 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.