WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] tribe_is_event() failing (10 posts)

  1. motorfirebox
    Member
    Posted 1 year ago #

    Hi, I'm having an issue integrating Yoast SEO with The Events Calendar. I've been piecing together a solution based on several previous threads, and it's going well, with a single exception: every time I try to call tribe_is_event(), it fails and I get a PHP error: "Trying to get property of non-object in .../the-events-calendar/lib/the-events-calendar.class.php on line 2510". That line is pretty innocuous: "$postID = $post->ID".

    I'm basing my function on the example conditional here: https://gist.github.com/2415009

    I'm using v2.0.10 with WP 3.4.2. I'm using a Thematic child theme, but this issue occurs even when I switch to Twenty Eleven. Any pointers on where to start looking would be greatly appreciated.

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Hi there motorfirebox. Thanks for the note here, and sorry that you're having problems. We recently had an issue related to this specifically, which was supposed to be fixed as of 2.0.10 (and was reported as such by other users facing a similar issue). I've asked the primary dev who wrote that code to take a look here and see if there is something we overlooked or if your install has something specific. Stay tuned and thanks for your patience so far.

  3. motorfirebox
    Member
    Posted 1 year ago #

    I greatly appreciate you guys looking into it. Just to clarify, disabling Yoast SEO does resolve the PHP errors, but unfortunately that's not a good permanent solution for us. Fingers crossed!

  4. Daniel Dvorkin (MZAWeb)
    Member
    Plugin Contributor

    Posted 1 year ago #

    Hi motorfirebox, I tried to replicate this issue and I'm not getting that notice. Can you explain a little bit better please how to replicate this? For instance, in what page are you getting that notice?

    Thanks!

  5. motorfirebox
    Member
    Posted 1 year ago #

    The error occurs in /events, /events/upcoming, /events/month (and past/previous months), but not on specific event pages. On pages with that notice, the title doesn't appear correctly (if that wasn't clear).

    The function I'm using is posted at http://pastebin.com/TVJZYvds. Here's my plugins list:

    Attachments v1.6.2.1
    Contact Form 7 v3.3.1
    Custom Post Type Shortcode v1.4.3
    FV Top Level Categories v1.4
    Google XML Sitemaps v3.2.8
    Menu Manager v1.0.4
    Raw HTML v1.4.8
    Really Simple CAPTCHA v1.5
    The Events Calendar v2.0.10
    Widget Classes v0.1
    Widget Data - Setting Import/Export Plugin v0.4
    WordPress SEO v1.3.1.1
    WP-Mail-SMTP v0.9.1
    WP-Migrate-DB v0.4.2

    As I said, I'm using a custom Thematic child theme, but I pasted the function into the functions.php of Twenty Ten and I get the same result. I'm doing this on a testbed installation, so if it would help, I can give you temp access to the site to see what's going on. Thanks again.

  6. Daniel Dvorkin (MZAWeb)
    Member
    Plugin Contributor

    Posted 1 year ago #

    hey motorfirebox, I'll need that access, because I'm replicating exactly your code, and I'm not getting any notice. In fact the title is getting set: http://screenshots.mzaweb.com/ibRG

    You can drop me an email at daniel@tri.be

  7. motorfirebox
    Member
    Posted 1 year ago #

    I'm not sure how this worked, I'm not sure why this worked, but it worked: I added an Events page through the WordPress interface, and suddenly the correct titles are showing up. I'm still getting the notice regarding 2510 but those can be hidden.

  8. Daniel Dvorkin (MZAWeb)
    Member
    Plugin Contributor

    Posted 1 year ago #

    Excellent! So are we all set for now?

  9. motorfirebox
    Member
    Posted 1 year ago #

    Yessir, it's up and running. Thanks again for looking into it.

  10. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Thanks for confirming that you're all set here, motorfirebox. Going to mark this one RESOLVED accordingly. Let us know what else you need down the road!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic