Instances of recurring event disappearing after edit

Home Forums Calendar Products Events Calendar PRO Instances of recurring event disappearing after edit

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #56356
    dtcaldwell
    Participant

    When ECP saves a recurring event the saveEvents function saves a _EventStartDate row in wp_postmeta for each date that the event recurs. The function saves these rows in date order, starting with the earliest date. But, when a program retrieves these values with get_post_meta(), the database query doesn’t always return them in the same order. (There is no ORDER BY clause in the query that get_post_meta runs.)

    This causes three problems in Events Calendar Pro:
    1. The instance with the first-retrieved _EventStartDate (not always the earliest instance) is the only instance that appears in List view (or list widget) if the “Recurring event instances–Show only the first instance of each recurring event” setting is checked.

    2. The instance with the first-retrieved _EventStartDate is the instance displayed if a visitor’s requests the URL of the event without specifying a date. For example, “/event/buzzards-bay/” instead of “/event/buzzards-bay/2013-08-05/”.

    3. If the first-retrieved _EventStartDate is not the earliest instance of the event, and the earliest instance of the event is edited and saved (choosing “All events” from the “Saving Recurring Events” dialog), then the first-retrieved _EventStartDate will disappear from wp_postmeta and the event will no longer appear on that date in the various calendar views. The recurrence rule will not change, and ECP will still treat all the remaining instances as part of one recurring event.

    I understand that you may have difficulty reproducing this problem, because it depends on the behavior of your database, which you cannot control directly. If I edit/update the event a few times, it always appears for me eventually, usually within 2-3 tries; it’s easiest to see by watching the database table in phpMyAdmin after each update.

    #56888
    Jonah
    Participant

    Hi dtcaldwell,

    Sorry for the delay in response here. I’ve forwarded this on to our developers as it’s beyond me. Thanks for the report though and hopefully we can clear this up.

    – Jonah

    #56981
    Timothy Wood
    Participant

    Hey dtcaldwell,
    Thank you for such a thorough explanation. I am wondering in the sake of speed if you could just send me all the post meta (sql dump by post_id) for an event you’re seeing instances disappearing on. I will jump on replicating this asap.

    Cheers,
    Tim

    #57048
    dtcaldwell
    Participant

    Tim,
    Thanks for looking at this. One more detail, though I doubt it’s relevant: I’m running a network install (a subdirectory install) of WordPress. I can reproduce this behavior in the root blog and, as in this dump, in another blog.

    There are two dumps, one of the post meta before editing and updating the event, and one after. (If there’s a better way to send these dumps, let me know.)

    Event start and end date is Aug 11, recurring 8a-5p daily through Aug 15. Before updating the event:
    — phpMyAdmin SQL Dump
    — version 3.2.5
    http://www.phpmyadmin.net

    — Host: localhost
    — Generation Time: Jul 25, 2013 at 08:01 AM
    — Server version: 5.1.44
    — PHP Version: 5.3.2

    SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;


    — Database: `wordpress`

    — ——————————————————–


    — Table structure for table `wp_3_postmeta`

    CREATE TABLE `wp_3_postmeta` (
    `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `post_id` bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    `meta_key` varchar(255) DEFAULT NULL,
    `meta_value` longtext,
    PRIMARY KEY (`meta_id`),
    KEY `post_id` (`post_id`),
    KEY `meta_key` (`meta_key`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1709 ;


    — Dumping data for table `wp_3_postmeta`

    INSERT INTO `wp_3_postmeta` VALUES(1, 2, ‘_wp_page_template’, ‘default’);
    INSERT INTO `wp_3_postmeta` VALUES(2, 4, ‘_edit_last’, ‘1’);
    INSERT INTO `wp_3_postmeta` VALUES(3, 4, ‘_edit_lock’, ‘1373374700:1’);
    INSERT INTO `wp_3_postmeta` VALUES(4, 4, ‘_wp_page_template’, ‘default’);
    INSERT INTO `wp_3_postmeta` VALUES(5, 2, ‘_edit_lock’, ‘1374147954:1’);
    INSERT INTO `wp_3_postmeta` VALUES(6, 2, ‘_edit_last’, ‘1’);
    INSERT INTO `wp_3_postmeta` VALUES(1235, 1, ‘_edit_lock’, ‘1374242658:1’);
    INSERT INTO `wp_3_postmeta` VALUES(1652, 60, ‘_EventAuditTrail’, ‘a:8:{i:0;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374516956;}i:1;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374516976;}i:2;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374517020;}i:3;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374517080;}i:4;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374517122;}i:5;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374517163;}i:6;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374517189;}i:7;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374590917;}}’);
    INSERT INTO `wp_3_postmeta` VALUES(1653, 60, ‘_EventOrigin’, ‘events-calendar’);
    INSERT INTO `wp_3_postmeta` VALUES(1654, 60, ‘_edit_last’, ‘1’);
    INSERT INTO `wp_3_postmeta` VALUES(1655, 60, ‘_edit_lock’, ‘1374590811:1’);
    INSERT INTO `wp_3_postmeta` VALUES(1656, 60, ‘_EventShowMapLink’, ‘1’);
    INSERT INTO `wp_3_postmeta` VALUES(1657, 60, ‘_EventShowMap’, ‘1’);
    INSERT INTO `wp_3_postmeta` VALUES(1706, 60, ‘_EventStartDate’, ‘2013-08-13 08:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1708, 60, ‘_EventStartDate’, ‘2013-08-15 08:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1707, 60, ‘_EventStartDate’, ‘2013-08-14 08:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1661, 60, ‘_EventVenueID’, ‘0’);
    INSERT INTO `wp_3_postmeta` VALUES(1662, 60, ‘_EventCurrencySymbol’, ‘$’);
    INSERT INTO `wp_3_postmeta` VALUES(1663, 60, ‘_EventCost’, ”);
    INSERT INTO `wp_3_postmeta` VALUES(1664, 60, ‘_EventURL’, ”);
    INSERT INTO `wp_3_postmeta` VALUES(1665, 60, ‘_EventOrganizerID’, ‘0’);
    INSERT INTO `wp_3_postmeta` VALUES(1666, 60, ‘_EventRecurrence’, ‘a:13:{s:4:”type”;s:9:”Every Day”;s:8:”end-type”;s:2:”On”;s:3:”end”;s:10:”2013-08-15″;s:9:”end-count”;s:1:”1″;s:11:”custom-type”;s:5:”Daily”;s:15:”custom-interval”;s:0:””;s:16:”custom-type-text”;s:0:””;s:21:”occurrence-count-text”;s:3:”day”;s:19:”custom-month-number”;s:5:”First”;s:16:”custom-month-day”;s:1:”1″;s:24:”custom-year-month-number”;s:1:”1″;s:21:”custom-year-month-day”;s:1:”1″;s:22:”recurrence-description”;s:0:””;}’);
    INSERT INTO `wp_3_postmeta` VALUES(1705, 60, ‘_EventStartDate’, ‘2013-08-12 08:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1702, 60, ‘_EventStartDate’, ‘2013-08-11 08:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1703, 60, ‘_EventEndDate’, ‘2013-08-11 17:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1704, 60, ‘_EventDuration’, ‘32400’);

    *******************
    After editing and updating (all future) the occurrence on Aug 11 (the initial date). The instance on Aug 13 was not rewritten:
    — phpMyAdmin SQL Dump
    — version 3.2.5
    http://www.phpmyadmin.net

    — Host: localhost
    — Generation Time: Jul 25, 2013 at 08:01 AM
    — Server version: 5.1.44
    — PHP Version: 5.3.2

    SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;


    — Database: `wordpress`

    — ——————————————————–


    — Table structure for table `wp_3_postmeta`

    CREATE TABLE `wp_3_postmeta` (
    `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
    `post_id` bigint(20) unsigned NOT NULL DEFAULT ‘0’,
    `meta_key` varchar(255) DEFAULT NULL,
    `meta_value` longtext,
    PRIMARY KEY (`meta_id`),
    KEY `post_id` (`post_id`),
    KEY `meta_key` (`meta_key`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1709 ;


    — Dumping data for table `wp_3_postmeta`

    INSERT INTO `wp_3_postmeta` VALUES(1, 2, ‘_wp_page_template’, ‘default’);
    INSERT INTO `wp_3_postmeta` VALUES(2, 4, ‘_edit_last’, ‘1’);
    INSERT INTO `wp_3_postmeta` VALUES(3, 4, ‘_edit_lock’, ‘1373374700:1’);
    INSERT INTO `wp_3_postmeta` VALUES(4, 4, ‘_wp_page_template’, ‘default’);
    INSERT INTO `wp_3_postmeta` VALUES(5, 2, ‘_edit_lock’, ‘1374147954:1’);
    INSERT INTO `wp_3_postmeta` VALUES(6, 2, ‘_edit_last’, ‘1’);
    INSERT INTO `wp_3_postmeta` VALUES(1235, 1, ‘_edit_lock’, ‘1374242658:1’);
    INSERT INTO `wp_3_postmeta` VALUES(1652, 60, ‘_EventAuditTrail’, ‘a:8:{i:0;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374516956;}i:1;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374516976;}i:2;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374517020;}i:3;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374517080;}i:4;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374517122;}i:5;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374517163;}i:6;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374517189;}i:7;a:2:{i:0;s:15:”events-calendar”;i:1;i:1374590917;}}’);
    INSERT INTO `wp_3_postmeta` VALUES(1653, 60, ‘_EventOrigin’, ‘events-calendar’);
    INSERT INTO `wp_3_postmeta` VALUES(1654, 60, ‘_edit_last’, ‘1’);
    INSERT INTO `wp_3_postmeta` VALUES(1655, 60, ‘_edit_lock’, ‘1374590811:1’);
    INSERT INTO `wp_3_postmeta` VALUES(1656, 60, ‘_EventShowMapLink’, ‘1’);
    INSERT INTO `wp_3_postmeta` VALUES(1657, 60, ‘_EventShowMap’, ‘1’);
    INSERT INTO `wp_3_postmeta` VALUES(1706, 60, ‘_EventStartDate’, ‘2013-08-13 08:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1708, 60, ‘_EventStartDate’, ‘2013-08-15 08:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1707, 60, ‘_EventStartDate’, ‘2013-08-14 08:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1661, 60, ‘_EventVenueID’, ‘0’);
    INSERT INTO `wp_3_postmeta` VALUES(1662, 60, ‘_EventCurrencySymbol’, ‘$’);
    INSERT INTO `wp_3_postmeta` VALUES(1663, 60, ‘_EventCost’, ”);
    INSERT INTO `wp_3_postmeta` VALUES(1664, 60, ‘_EventURL’, ”);
    INSERT INTO `wp_3_postmeta` VALUES(1665, 60, ‘_EventOrganizerID’, ‘0’);
    INSERT INTO `wp_3_postmeta` VALUES(1666, 60, ‘_EventRecurrence’, ‘a:13:{s:4:”type”;s:9:”Every Day”;s:8:”end-type”;s:2:”On”;s:3:”end”;s:10:”2013-08-15″;s:9:”end-count”;s:1:”1″;s:11:”custom-type”;s:5:”Daily”;s:15:”custom-interval”;s:0:””;s:16:”custom-type-text”;s:0:””;s:21:”occurrence-count-text”;s:3:”day”;s:19:”custom-month-number”;s:5:”First”;s:16:”custom-month-day”;s:1:”1″;s:24:”custom-year-month-number”;s:1:”1″;s:21:”custom-year-month-day”;s:1:”1″;s:22:”recurrence-description”;s:0:””;}’);
    INSERT INTO `wp_3_postmeta` VALUES(1705, 60, ‘_EventStartDate’, ‘2013-08-12 08:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1702, 60, ‘_EventStartDate’, ‘2013-08-11 08:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1703, 60, ‘_EventEndDate’, ‘2013-08-11 17:00:00’);
    INSERT INTO `wp_3_postmeta` VALUES(1704, 60, ‘_EventDuration’, ‘32400’);

    #57148
    Timothy Wood
    Participant

    dtcaldwell , This is great, any chance you could just provide the sql as a file? seems that our forum is mangling some of the characters when I’m testing this and I want to make sure I get as close to the original source as possible (thus no manual fixing of characters)

    #57168
    dtcaldwell
    Participant

    This reply is private.

    #57367
    Timothy Wood
    Participant

    Thank you for the update, just wanted to let you know we’re working on replicating this and will have an appropriate fix in place soon.

    #58009
    Rob
    Member

    Hi there dtcaldwell: just wanted to follow-up here. Since Jonah’s last day was Friday I wanted to make sure we adequately communicated where we are here; I’ll take point on this thread from here forward.

    I had our lead dev Jessica test these points last night, and she was able to confirm them all (thanks for your awesome steps-to-recreate). We are working on this now and should have a fix deployed that addresses your issues across the board in an impending maintenance release. Thanks for your patience so far and please let me know if you need anything else or encounter other issues.

    #58020
    dtcaldwell
    Participant

    Thank you. I’m looking forward to the release.

    #58144
    Bernhard
    Participant

    Same problem, glad it was reported already very detailed 🙂
    Posting just to get notified.

    #58566
    Rob
    Member

    Just a heads up that this was not included in yesterday’s minor maintenance release, but should be in the next one (which will be more substantive than just the couple bug fixes deployed yesterday).

    #74791
    Neill
    Member

    Hi dtcalwell – just a quick update. This issue should be fixed and in the coming release which is scheduled in the coming week. While this ticket will remain closed, feel free to open a new ticket if you find the update does not fix this issue.

    Thanks for you patience and help with resolving the issue.

    #981827
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Instances of recurring event disappearing after edit’ is closed to new replies.