event_tribes post type taking over WP_Query

Home Forums Calendar Products Events Calendar PRO event_tribes post type taking over WP_Query

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #71321
    nateritter
    Participant

    I created my own short codes using these two files:

    http://pastebin.com/xP463B73
    http://pastebin.com/B0Qffmcw

    They are pretty simple additions of shortcodes. The problem is that when I have the Events Calendar plugin enabled, it takes over my WP_Query on line 28 of http://pastebin.com/B0Qffmcw . Here’s the output of the $connect_groups_query variable if I turn on Events Calendar v3.1 (not even turning on PRO yet): http://pastebin.com/aib6VXHF

    Notice line 9 – the query_vars post_type is ‘post’ and ‘tribe_events’. Turning off the Events Calendar plugin results in what it should be … shown here: http://pastebin.com/2RReRce1 … notice line 6 where the query_vars post_type is ‘base_connect_groups’.

    Why does the Events Plugin overwrite my query when it’s clearly a new WP_Query instantiation? Is this a bug?

    #71380
    Barry
    Member

    It shouldn’t, is the short answer 🙂

    Is it possible that in the context of where you are using those shortcodes an event or event-related query has already run? Have you also investigated if any other plugins/your theme/other custom code might in turn be impacting here?

    #71410
    nateritter
    Participant

    I tested with all other plugins disabled and the 2011 theme.

    #71500
    Barry
    Member

    An obvious difficulty in trying to replicate is that I don’t have either your data or this particular custom post type that you are using – nor do I know the complete context (ie, where are you actually deploying these shortcodes?).

    However, if I set something like this up it returns the expected results and – if I inspect the WP_Query object (in my example) – it has not been taken over in any way. This is true whether I use the shortcode in a regular page or even if I embed it in an event description and view that single event.

    It could definitely be I’m misunderstanding some aspect of what you’ve done in your own code and my own test is failing to replicate it, if so definitely let me know: should there be a bug here we’ll be happy to investigate further. Right now though I’m not sure exactly why or how the problem you are describing would come about.

    #71513
    nateritter
    Participant

    Hmm.. ok. I’ll try to simplify the shortcode-generating code to see if perhaps it’s somewhere in there that’s the issue, but it’s strange that it doesn’t have a problem with any other plugin whatsoever. I’ll keep looking through my code I guess.

    #71563
    Barry
    Member

    It is strange – and we’re totally open to the idea of there being a problem on our side, but we’d need a better sense of how to recreate it 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘event_tribes post type taking over WP_Query’ is closed to new replies.