Support » Plugin: The Events Calendar » Latest Update is Ignoring Custom URL

  • darrinb

    (@dbmartin)



    My client just upgraded to 4.6.10 and now the custom slug we had set is no longer being recognized.

    Previously, we had a page with the url of /events. To get around the issue of this plugin trying to use the “events” slug we set a custom Events URL slug in the Events Settings field. But this latest update is ignoring the custom slug and loading the default Events calendar where our original page (Events) used to exist.

Viewing 12 replies - 1 through 12 (of 12 total)
  • darrinb

    (@dbmartin)

    So I discovered the issue. In the Tribe__Events__Rewrite class there is a method called get_bases() which sets the slug bases for custom permalinks.

    In earlier versions of TEC, the archive base was set by getting the option saved in Events >> Settings >> Events URL slug:

    `
    $bases = apply_filters( ‘tribe_events_rewrite_base_slugs’, array(
    ‘month’ => array( ‘month’, $tec->monthSlug ),
    ‘list’ => array( ‘list’, $tec->listSlug ),
    ‘today’ => array( ‘today’, $tec->todaySlug ),
    ‘day’ => array( ‘day’, $tec->daySlug ),
    ‘tag’ => array( ‘tag’, $tec->tag_slug ),
    ‘tax’ => array( ‘category’, $tec->category_slug ),
    ‘page’ => (array) ‘page’,
    ‘all’ => array( ‘all’, $tec->all_slug ),
    ‘single’ => (array) Tribe__Settings_Manager::get_option( ‘singleEventSlug’, ‘event’ ),
    ‘archive’ => (array) Tribe__Settings_Manager::get_option( ‘eventsSlug’, ‘events’ ),
    ‘featured’ => array( ‘featured’, $tec->featured_slug ),
    ) );
    `

    In the new version it’s setting “events” as the slug regardless of what you save in your Events Options:

    `
    $bases = apply_filters( ‘tribe_events_rewrite_base_slugs’, array(
    ‘month’ => array( ‘month’, $tec->monthSlug ),
    ‘list’ => array( ‘list’, $tec->listSlug ),
    ‘today’ => array( ‘today’, $tec->todaySlug ),
    ‘day’ => array( ‘day’, $tec->daySlug ),
    ‘tag’ => array( ‘tag’, $tec->tag_slug ),
    ‘tax’ => array( ‘category’, $tec->category_slug ),
    ‘page’ => array( ‘page’, esc_html_x( ‘page’, ‘The “/page/” URL string component.’, ‘the-events-calendar’ ) ),
    ‘single’ => array( ‘event’, $tec->rewriteSlugSingular ),
    ‘archive’ => array( ‘events’, $tec->rewriteSlug ),
    ‘featured’ => array( ‘featured’, $tec->featured_slug ),
    ) );
    `

    The solution:

    `
    function filter_tribe_bases( $bases = array() ){

    $rewriteSlug = sanitize_title( Tribe__Settings_Manager::get_option( ‘eventsSlug’, ‘events’ ) );
    $bases[‘archive’] = array( $rewriteSlug );

    return $bases;
    }
    add_filter( ‘tribe_events_rewrite_base_slugs’, ‘filter_tribe_bases’ );
    `

    darrinb

    (@dbmartin)

    I’m having a similar problem with the custom URL functionality where the update no longer recognizes “/” so instead of /menu-tab/events, for example, it changes it to /menu-tab-events/. Is this something that can be fixed?

    Plugin Author Victor Zarranz

    (@vicskf)

    Hi @dbmartin & @soo7mi!

    Thanks for reaching out and for taking your time to report this.

    We have released a hotfix to address this issue with the Events slug designated in the settings. Learn more about it > https://theeventscalendar.com/the-events-calendar-4-6-10-1/

    Please update the plugin and see if it works for your sites.

    Thanks,
    Victor

    @vicskf The update didn’t work for me. For example, the plugin used to allow for /menu-tab/events and now it rewrites/strips it and changes it to menu-tab-events.

    soo7mi

    (@soo7mi)

    Just tested it again and am still having the same issue where the custom URL /path-to-custom/slug saves it as path-to-custom-slug. I’m using v4.6.11.1.

    @vicskf just following up again since there’s still an issue.

    @vicskf Still haven’t heard anything back regarding a fix for the issue. Any update?

    Any movement on this? I have the same issue.

    Nope, haven’t heard a word from the developer(s) @vicskf. Still an ongoing issue.

    Just following up on this again. Does anyone have a solution? It’s still an issue.

    Any chance of getting this issue resolved please?

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.