Skip Navigation

Waiting for author

Topic Tags: Compatibility

Overview of the issue

If you are using The Events Calendar plugin and you have several events on the archive page, you will find that the pagination links for secondary languages do not work. Instead, they point to links like (/?:page|seite|Seite)/(d_)/ or (/?:page|pàgina|página|página)/(d_).

Workaround

Please be sure to make a full backup of your site before proceeding.

  1. Edit the file located in wp-content/plugins/the-events-calendar/src/Tribe/I18n.php.
  2. Look for line 189.
  3. Replace:
    remove_filter( 'locale', $force_locale );
    
  4. With:
    remove_filter( 'locale', $force_locale );
    
    foreach ( (array) $args[1] as $domain => $file ) {
        // Reload it with the correct language.
        unload_textdomain( $domain );
    
        if ( 'default' === $domain ) {
            load_default_textdomain();
        } else {
            Common::instance()->load_text_domain( $domain, $file );
        }
    }
    

Next steps to resolve this issue

This issue has been reported to The Events Calendar team for a permanent fix. However, you can only help to move things along by expressing your interest in this effort via their support forum.

11 Responses to “The Events Calendar - Events Archive Pagination not working and redirects to (/?:page|seite|Seite)/(d_)/ resulting in /(/?:events|veranstaltungen)/”

  1. Workaround:
    Go to WPML string translation, search for the string “list”, change the translation of the string to English. Then do the same for the string “page”. The later because is breaking the previous / next events button pagination. The former is breaking the URL in other cases.

  2. Hi, all. This workaround did not work for us. Any chance that plugin updates on either side (since this was posted) may have made this workaround ineffectual?

    The support folks at The Events Calendar had this to say:

    “We have a bug report for this problem and our workaround is to keep the Admin User profile language as the site default for WPML users. We are aware of the WPML workaround as well but suggest going with our’s first. I’ve added your case to our internal report. While we don’t have an ETA at the moment, we’ll be sure to notify of a fix when it’s available.”

    That’s a little ambiguous. We tried to change the default languages for all admin users to both “site default” and “English,” and the WPML default language is set to English. Neither fixed the issue.

    Does anyone have any other solutions?

    • Hey there,
      Unfortunately, we don’t have another workaround at the moment.
      If the workaround here presented does not help, I would suggest you to open a ticket in our support forum so we can investigate your situation as it may be a specific case.
      Regards

  3. Have there been any further updates to this issue? As of The Events Calendar plugin version 5.14.1 the ‘foreach’ workaround is included in their script already. I also looked at my string translation as Zuke recommended but both “list” and “page” are already set to English.

    • From further poking around, I found an odd behavior that may help diagnose the issue… When you are looking at The Events Calendar (Pro version) on a site with WPML translations, you get the same odd URL translation on the different view types, such as Month view, as seen in this screenshot. Clicking this link seems to reload the page but NOT change to Month view… However, after clicking Month view once, the URL is now updated correctly? See screenshot after click. If I reload the page or navigate away and back, the Month URL becomes messed up again.

    • Thanks for your report Joe. As it seems like a slightly different scenario, could you please open a ticket in our support forum so we can investigate your situation?
      Regards

  4. Hello, I seem to be having a similar issue with pagnation. I tried the code workaround and the Admin users set to ‘Site Default’ but the issue persists.

    When I am on the second language, any view, and go to pagnation, the wrong url keeps getting added forcing category colors and links to malfunction. It is supposed to be [url.com/es/events] but instead it goes to [url.com/es/eventos]. I have not been able to remove this ‘Eventos’ causing issues.

    And upon clicking other buttons like List, or Categories, the page doesnt reload (or Cache), because all my category colors show for both languages, then once i refresh, it looks like it is supposed to.

    Thank you for your help

    • Hey there,
      I’m not entirely sure if it is the same issue from this errata. Please, check if you have translated the “events” slug in WPML > Settings > Post Types Translation. If that it is the case and the issue remains, please open a ticket in our support forum to assist you better.
      Regards

  5. Hi there,
    I have the same issue on my site: https://www.musikstadt-luzern.com/en/

    When i’m switching away from my default language (German) to my second language English, i C’ANT navigate in the calendar view. Also the Link wants to redirect to: (/?:page|seite|Seite)/(d_)/.
    i dont translate the Events tho. All my events are in German, therefore i deactivated the posttype translation for “Events”.

    I saw that this is a known issue for quit a time.

    Is there a new solution to this?

    • Hello there,
      At the moment we don’t have another workaround, however the author is planning to introduce a fix in a future release.
      If this does not help, please open a ticket in our support forum so we can investigate your case.
      Regards

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>