Help Desk

URL parameters not working with events calendar shortcode

  • Posts: 26 Topics: 9
    | Permalink

    I’m having the same problem that was outlined in a previous thread here: https://theeventscalendar.com/support/forums/topic/url-parameter-tribe-bar-date2017-09-doesnt-work-with-shortcode-calendar/

    I’m running TEC 4.6.8 + PRO 4.4.20, and you can find my shortcode calendar here: https://www.ncrla.org/servsafe-certification-courses

    Here’s my shortcode: [tribe_events view=”month” category=”servsafe”]

    So, the issue occurs when a visitor is clicking around and ends up with a URL in this format: https://www.ncrla.org/servsafe-certification-courses/?tribe_events_cat=servsafe&tribe-bar-date=2018-01

    When this happens, my pages loses its formatting and the calendar says “There were no results found” even though there are events listed in that month. Is there a fix for this situation? I love the shortcode functionality but this will cause problems with visitors. Thanks for your help.

    Posts: 2500
    | Permalink

    Hi Christopher,

    Thanks for email support and sorry you are having issues with the shortcode. Looks like it may be a conflict with the new version and possible another plugin.

    Can you also try testing for conflicts with your theme and other plugins? If you would prefer not to do this on your live site, WP Staging will let you create a quick copy of your live site that you can use for testing. Let me know what you find!

    Thanks,
    Brendan

    Posts: 26 Topics: 9
    | Permalink

    I’ve created a staging site, which doesn’t have any WP Engine cacheing or other addons, and I’m still having the same problem. Also with all plugins disabled (except Advanced Custom Fields which is causing fatal errors when I disable it) and also same problem in 2017 default theme. Here’s a link: https://ncrla.staging.wpengine.com/servsafe-certification-courses/?tribe_events_cat=servsafe&tribe-bar-date=2018-01

    When I’m navigating within the site (starting here: https://ncrla.staging.wpengine.com/servsafe-certification-courses), it appears normally. But once I start going back and forth, or if I call up this URL directly, it breaks and shows no events and incorrect formatting: https://ncrla.staging.wpengine.com/servsafe-certification-courses/?tribe_events_cat=servsafe&tribe-bar-date=2018-01

    See attached for how the calendar should appear w/ 2017 Theme. Thanks for your help.

    Posts: 2500
    | Permalink

    Hi. Sorry you’re experiencing this.

    Thanks for your detailed message.

    Please install the Rewrite Rules Inspector plugin (third-party, not guaranteed or supported by us) and send me a screenshot of its analysis of https://ncrla.staging.wpengine.com/servsafe-certification-courses

    Thanks,
    brendan

    Posts: 26 Topics: 9
    | Permalink

    Here you go…

    Posts: 2500
    | Permalink

    Hi Christopher,

    Thanks for the screenshot. What happens if you remove that rewrite rule? Is the problem resolved?

    Thanks,
    Brendan

    Posts: 26 Topics: 9
    | Permalink

    Hi Brendan,

    Sorry to be a bit dense here, can you explain how to remove that re-write rule? I “flushed” the rules using that plugin, but that didn’t seem to change anything. Any help appreciated. Thanks,
    -Chris

    Posts: 2500
    | Permalink

    Hi there,

    It depends on where you have it. It most likely is in your .htaccess file in the root directory of your site.

    Check there and let me know what you find.

    Thanks,
    Brendan

    Posts: 26 Topics: 9
    | Permalink

    According to support at my host (WP Engine):

    Weird, Im not seeing any rewrite in your rewrite rules tab for this or your htaccess

    bash: fc: history specification out of range
    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    There are no rewrite rules for that.

    Please advise. Thanks!

    Posts: 2500
    | Permalink

    Hi Christopher,

    So WP Engine said those rewrite rules do not exist?

    Thanks,
    Brendan

    Posts: 26 Topics: 9
    | Permalink

    Correct, that is my understanding of what WP Engine support said (see quote in my previous post). Where would that leave us?

    Posts: 2500
    | Permalink

    Hi Chris,

    WP engine should be able to just add those rewrite rules or the standard rewrite rules. Did they give you info on why or when they were removed?

    Thanks,
    Brendan

    Posts: 26 Topics: 9
    | Permalink

    Can you please specify which rewrite rules should be in place for this Events Calendar shortcode functionality to work? Then I will ask WP Engine to put them in place. Thanks.

    Posts: 2500
    | Permalink

    Hi Christopher,

    The plugin just needs the default rewrite for WordPress.

    Its the one above in this thread.

    Thanks,
    Brendan

    Posts: 26 Topics: 9
    | Permalink

    OK, perhaps I’ve been unclear. WP Engine assures me that I DO have .htaccess with default WP rewrite rules in place for this install. So, with that in place, is there some other rewrite rule that also needs to be added? Thanks.

    Posts: 2500
    | Permalink

    Hi Christopher,

    Those are the only rules needed. When we checked before, it seemed like there was another rule somewhere else that may be causing the conflict. Have you used any other plugins to do rewrites?

    Thanks,
    Brendan

    Posts: 26 Topics: 9
    | Permalink

    Hi Brendan,

    No, I don’t have any other plugins that do re-writes as far as I know. On this staging install, I have only these 4 plugins active:

    Advanced Custom Fields (5.6.7)
    Rewrite Rules Inspector (1.2.1)
    Events Calendar (4.6.9)
    Events Calendar Pro (4.4.21)

    Again, to re-state the problem, if you visit a link in this format: https://ncrla.staging.wpengine.com/servsafe-certification-courses/?tribe_events_cat=servsafe&tribe-bar-date=2018-02

    It will show as no events found. But if you start on this page, where the shortcode lives, you’ll see lots of events for Feb 2018: https://ncrla.staging.wpengine.com/servsafe-certification-courses/

    Thanks for your help troubleshooting this one.

    Posts: 2500
    | Permalink

    Hi there,

    I just realized when you restated the question the issue here. the format will not work because you are using a shortcode. You need to go to the actual events page like so: https://ncrla.staging.wpengine.com/events/?tribe_events_cat=servsafe&tribe-bar-date=2018-02

    Does that make sense?

    Thanks,
    Brendan

    Posts: 26 Topics: 9
    | Permalink

    OK, is there a way to make it work with the shortcode? I need to use the shortcode in order to embed a specific category within a specific page.

    Posts: 2500
    | Permalink

    Hi there,

    This is where a redirect may come in handy. You can essentially setup the one that doesn’t work to redirect to your actual event calendar. Other than that, we do not have an option to set permalinks on the shortcode itself.

    Hope that helps.

    Thanks,
    Brendan

    Posts: 26 Topics: 9
    | Permalink

    Hi Brendan, I appreciate the help but I’m also disappointed, both that this functionality is broken when using the shortcode calendar and also that it has taken a month to explain this (I went back and checked that I explained clearly that this is a shortcode-generated calendar in my original posting). Are there any plans that you know of to fix this? Thank you.

    Posts: 2500
    | Permalink

    Hi there,

    Sorry it took so long to get this ironed out.

    If you think that is something you would like as a feature I encourage you to visit our User Voice Page and either upvote an existing request or make a new request there.

    You can suggest it it http://tribe.uservoice.com.

    Thanks,
    Brendan

    Posts: 65
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink

The topic ‘URL parameters not working with events calendar shortcode’ is closed to new replies.