• In WordPress 3.2, when making a new event, the “All Day Event” checkbox is checked, yet the time of day settings are displayed. Unchecking the “All Day Event” checkbox hides the time of day options. This makes it impossible to create a non-all-day event.

    I tracked down the issue to some incorrect jQuery. WordPress 3.2 ugrades from jQuery 1.4.4 to 1.6.1, and one of the major changes is how jQuery handles checkboxes.

    To fix the issue, make the following change.

    In /the-events-calendar/views/events-meta-box.php, lines 35-41 read:

    if( jQuery('#allDayCheckbox').attr('checked') == true ) {
      jQuery(".timeofdayoptions").addClass("tec_hide")
      jQuery("#EventTimeFormatDiv").addClass("tec_hide");
    }

    Change those lines to:

    if( jQuery('#allDayCheckbox').prop('checked', true) ) {
      jQuery(".timeofdayoptions").addClass("tec_hide");
      jQuery("#EventTimeFormatDiv").addClass("tec_hide");
    }

    This fixes uses the new .prop() method as well as adding a missing semicolon. Without this, I consider the plugin unusable, so it would be great if a new bug fixing release could come out with just this

Viewing 13 replies - 16 through 28 (of 28 total)
  • @mrwweb, I appreciate your efforts and I was wondering if you were the plugin admin, or just a good samaritan.

    Thanks for your efforts and time contribution. You’ve gotten the module to a point where I too can finish a site for a client.

    I would think that this is serious enough that we should post this to the plugin developers bug tracking queue.

    I’ll post my suggestions on validation separately so that they are not confused.

    @ mrwweb – if I choose “not an event” and enter any date it will still show January 1 1970 on the front end.

    However as long as I choose “event” it works fine. Since all my posts are events this really isn’t an issue.

    Actually found the reason for this error and the fix for anyone still encountering this issue:

    https://wordpress.stackexchange.com/questions/22317/the-events-calendar-issues-in-wp-3-2

    Worked like a charm for me.

    >Actually found the reason for this error and the fix for anyone still encountering this issue:
    >https://wordpress.stackexchange.com/questions/22317/the-events-calendar-issues-in-wp-3-2

    Didn’t work for me. The date reproduced four times, as experienced by a poster on that page.

    I wonder if the WP update that might be causing this problem also causes behavior where an edited event post forgets the date/time settings?

    The above fix for 18-21, 23-29 and 126-128 only partially worked for me: the 126-128 block DIDN”T work, producing multiple entry days/times, while block 23-29 did work to both fix the checkbox and hide the events entry form until the radio button was checked.

    “The above fix for 18-21, 23-29 and 126-128 only partially worked for me: the 126-128 block DIDN”T work, producing multiple entry days/times, while block 23-29 did work to both fix the checkbox and hide the events entry form until the radio button was checked.”

    I found this to work for me. If I updated the code at 126-128, I had duplicate dates (4) and it didn’t work properly. This seems to resolve the problem.

    I did not have any luck with the fix at: https://wordpress.stackexchange.com/questions/22317/the-events-calendar-issues-in-wp-3-2, although I did not go back and see if just updating same code locations that worked for me with the other fix was successful.

    Much thanks to the other users who found the fix for this problem. It’s a shame the plugin author is not supporting it.

    First – r3volution11, Thank you for the fix there as it was a solid solution.
    Some notes:

    • You must make sure that you are using the 1.6.2 version of jquery when using this fix or else it will not work
    • The checked/unchecked issue with all day events still shows up. One hack for this is go to line 969 of the-events-calendar.class.php and change the ‘checked’ to ‘unchecked’.
    • If you still see the 4 day input bug, make sure you are using jquery version 1.6.2.

    Hope that helps.

    Hey guys. I was running into the same issue again with one of my installs so I dove into the jQuery again in events-meta-options.php and changed a couple of things around. It’s 100% working for me now on all installs (4 sites) so hopefully it will be the same for you all.

    Hit up rvo.me/dia for the code and please comment if it does or doesn’t do the job. ??

    By the way, I’m slowly going through and updating everything actually. I’ve currently got a lot of projects on my plate so it will take me a few but hopefully soon I’ll have something together that will work out of box with the Roots theme (https://www.rootstheme.com/).

    Thank you.
    Worked a treat for me although I now have another issue which i do not think is related but might be.

    my theme layout has suddenly broken by pulling the sidebars incorrectly.
    sidebar content sidebar layout is okay as is full content is okay but when layout of sidebar- content or content-sidebar is called the sidebars are pulled when they are not meant to be.

    My default layout is sidebar-content-sidebar

    sidebar-content
    The sidebar primary is called followed by the content followed by the sidebar-alt

    content-sidebar
    the content is called then the sidebar then the sidbar-alt under the comments feild.

    Very odd

    You can view here.

    https://margaretriverguide.com.au/eguide

    and here

    https://margaretriverguide.com.au/resources/testing/

    I would appreciate your assistance and some pointers as I can not find the cause of this issue.

    Recent actions include upgrades to wordpress 3.2.1 and genesis.
    Instal of flash video player plugin (uninstalled to see if fixed problem but with no difference) and this change to The Events Calendar.

    If I deactivate the events calendar the theme is all okay again, so may or may not be related to this change, although I have it working on another similar site? r3volution11 I would appreciate you looking as you have a sound knowledge of this plugin or anyone else who has a good idea to try.

    Thanks

    bwp

    (@bwordpress)

    r3volution11, I tried comparing your new code to the original, and the DOS fc command gave up, saying they were too different. I noticed you even removed stuff like some of the EventBrite language. Probably not a big deal, but it just makes me wary until I can audit everything….

    Still I want and need a solution like yours, and I thank you for sharing it…

    Meanwhile, the save-draft workaround has been doing the job.

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘"All Day Event" Bug in WP3.2 [with Solution]’ is closed to new replies.