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.
I have a small issue with the event module. If one tries to edit an event, the hour fields will be reset to zero. It also happens when I use a "clone" method with the clone module.
Is it safe to upgrade to a newer version - it is a couple of months old (but afaik the changelog has not changed since 2006!). the database seems to have not changed!
Comment | File | Size | Author |
---|---|---|---|
#5 | event.module.patch | 1.74 KB | wdrout |
#4 | event-hour_field_reset.patch | 1.26 KB | smccabe |
Comments
Comment #1
Gabriel R. CreditAttribution: Gabriel R. commentedHi Gunnar,
I have the same issue on my installation. Did you manage to fix the problem?
Thanks.
Comment #2
HansKuiters CreditAttribution: HansKuiters commentedAlmost a year later and I also have this issue. Are the dev versions stable enough or is this issue being fixed for this 5.x-1.0 release?
Comment #3
pathogen CreditAttribution: pathogen commentedFYI this is an issue on the latest 6.x release as well.
Comment #4
smccabe CreditAttribution: smccabe commentedThis bug is present in all versions of the event module, 5.x-1.0, 5.x-1.x-dev, 5.x-2.x-dev and 6.x-2.x-dev. It only happens if the hour value is lower than 10 and the time is set to 24hrs, it will also happen to the minutes field if it is under 10 on either 12 or 24 hour time. It happens because the default value is set in 2 digits '05', while the select option value is set as 1 digit '5'.
Attached is a patch for 5.x-1.0, the same patch should be easy enough to modify for 1.x-dev and 2.x-dev as the code is quite similar. The 6.x branch is quite different but the bug is still present and the same fix should work.
Comment #5
wdrout CreditAttribution: wdrout commentedHere's what I did to patch the 6.x version. It's very similar, but I needed to account for 12/24 hour conversion issue as well.
Comment #6
HansKuiters CreditAttribution: HansKuiters commentedI needed to change another thing in my installation. Can't make a patch file but I changed
// $hour_format = t('H');
to this:
$hour_format = 'H';
in line 1469.
Developers: why date and time code in the t-function?
edit: added line number.
Comment #7
japerryEvent for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.