For quite some time

For quite some time now, I've been trying to sort out the cause of a problem with the [eab_expired] and [eab_archive] shortcodes for Events+. This issue and a couple others finally inspired the massive plugin conflict test I've been working on for two weeks. And at last, I think I have found the culprit!

My site is stripped down to no plugins except the WPMUDEV dashboard and Events+. The page where I display events using those shortcodes works fine....until I activate SmartCrawl.

Then I get nothing but the page title.

Here is the error in apache.log (there is no error in WP debug.log):

[Sat May 27 19:36:59.797146 2017] [:error] [pid 6515] [client] PHP Fatal error: Call to undefined method Eab_ArchivedCollection::get_timestamp() in /var/www/html/wp-content/plugins/events-and-bookings/lib/class_eab_collection.php on line 312, referer:

  • kalico

    Hi Luis, as we discussed in chat, I switched to TwentyFifteen to rule out theme problems. I added my event template to that theme (and the template has been validated to be sure it's not a code problem in there).

    Test page:

    This page started out identical to the live one, which has multiple shortcodes intermixed from Events+ and another plugin, Tabby Responsive Tabs. It worked fine until SmartCrawl was activated, then I got just the page title.

    So next I stripped the Tabby shortcodes out, so I can test some other aspects of the Events shortcodes. (Aside: I had ruled out Tabby as the cause through a different round of testing, but I took it out here for simplicity's sake.)

    This is how it looked when I began testing:

    [eab_archive category=106 lookahead=yes weeks=26 class="auto-title-upcoming" template="event-list-with-thumbnails"]
    [eab_expired category="148" order="DESC" template="event-list-with-thumbnails"]
    [eab_expired category="141" template="event-list-with-thumbnails"]
    [eab_expired category="118" template="event-list-with-thumbnails"]
    [eab_expired category="110" template="event-list-with-thumbnails"]
    [eab_expired category="138" template="event-list-with-thumbnails"]
    [eab_expired category="136" template="event-list-with-thumbnails"]
    [eab_expired category="137" template="event-list-with-thumbnails"]
    [eab_expired category="119" template="event-list-with-thumbnails"]

    For the first test, I took it down to just the one ARCHIVE shortcode, without a template reference:

    [eab_archive category=106 lookahead=yes weeks=26 class="auto-title-upcoming" ]

    On the page alone, this ^ works, even WITH SmartCrawl activated. So without the template, we're ok.

    Next, I added an EXPIRED call, with no template:

    [eab_archive category=106 lookahead=yes weeks=26 class="auto-title-upcoming" ]
    [eab_expired category="148" order="DESC"]

    These two ^ together on the page work fine with SmartCrawl enabled.

    If I add the template back in to the ARCHIVE shortcode, the page still works. But if I add it back to the EXPIRED shortcode, the page fails (i.e., displays the title only).

    So this one fails:

    [eab_archive category=106 lookahead=yes weeks=26 class="auto-title-upcoming"]
    [eab_expired category="148" order="DESC" template="event-list-with-thumbnails"]

    But if I put the template reference in the ARCHIVE shortcode, but NOT the EXPIRED shortcode, it works, like this:

    [eab_archive category=106 lookahead=yes weeks=26 class="auto-title-upcoming"   template="event-list-with-thumbnails"]
    [eab_expired category="148" order="DESC"]

    All of the above was done with SmartCrawl activated.

    This works:

    [eab_archive category=106 lookahead=yes weeks=26 class="auto-title-upcoming" ]
    [eab_expired category="148" order="DESC"]
    [eab_expired category="141"]

    This does not:

    [eab_archive category=106 lookahead=yes weeks=26 class="auto-title-upcoming" ]
    [eab_expired category="148" order="DESC"]
    [eab_expired category="141"   template="event-list-with-thumbnails"]

    BUT....when I deactivate DOES WORK!!

    As long as SmartCrawl is inactive, I can add back all the template references, and the page still this:

    [eab_archive category=106 lookahead=yes weeks=26 class="auto-title-upcoming"   template="event-list-with-thumbnails" ]
    [eab_expired category="148" order="DESC"   template="event-list-with-thumbnails"]
    [eab_expired category="141"   template="event-list-with-thumbnails"]

    I hope that helps. If I learn more, I'll post back here.

  • kalico

    Thought it might be useful to see the code in my template file, since that seems to be involved:

    // template used to display  shortcode lists e.g., [eab_archive template="event-list-with-thumbnails"] also works with [eab_expired] //
    if ($events) {
    	foreach ($events as $event) {
    		<section class="eab-events-archive <?php esc_attr_e($args['class']); ?>">
    		<?php $event = $event instanceof Eab_EventModel ? $event : new Eab_EventModel($event); ?>
    		<article class="eab-event <?php echo eab_call_template('get_status_class', $event); ?>" id="eab-event-<?php echo $event->get_id(); ?>">
    <div class="event-listing">
    				<span class="event-listing-thumbnail"><?php echo $event->get_featured_image(); ?></span>
    		<span class="event-listing-title"><?php echo $event->get_title(); ?></span>
    				<span class="event-listing-meta"><?php echo eab_call_template('get_archive_content', $event); ?></span>
    				<span class="event-listing-excerpt"><?php echo $event->get_excerpt_or_fallback(300); ?></span>
    	<?php }
    	} else { ?>
    <?php	}
  • kalico

    Hi Vaughn,

    I didn't see your message until today. Our site came under a brute force attack, and had a hard time stabilizing after that, so we had quite a bit of recovery to do. We just got it going solid today. I've also been missing a lot of emails, perhaps due to how Google Inbox is filtering them.


    This particular issue comes down to SmartCrawl, as far as I can tell. I have disabled it on my live site, and even with all the other plugins I have running there, it fixed the problem with not being able to see more than X number of posts in each shortcode.

    I'm going to have a new dev site up soon for further testing. But meanwhile, I just wanted to let you know that I tested this with no other plugins enabled, just Events+ and SmartCrawl. I was able to consistently recreate the problem.

    You have my page shortcodes and my template file contents, so if this is real you should be able to replicate the environment and test the scenarios described above.

    It should also be noted that in my experience it takes 13 events in a shortcode to "break" the page in our environment.

    In our case, we have 10+ events in EACH category, but we first noticed it when one of the categories hit 13. We could add more events in a every category up to 12, but if any category got up to 13 the whole page would break.

    In testing (with no other plugins enabled) I used that number of events as my baseline (12 it works, 13 it breaks), and I had 3 category shortcodes on the page (as shown above).

    I hope that helps!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.