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!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gabriel R.’s picture

Component: Basic Event » Code

Hi Gunnar,

I have the same issue on my installation. Did you manage to fix the problem?

Thanks.

HansKuiters’s picture

Almost 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?

pathogen’s picture

FYI this is an issue on the latest 6.x release as well.

smccabe’s picture

This 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.

wdrout’s picture

Status: Active » Needs review
FileSize
1.74 KB

Here'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.

HansKuiters’s picture

I 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.

japerry’s picture

Status: Needs review » Closed (outdated)

Event 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.