Trevor

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Broken URL rewriting with AJAX #947468
    Trevor
    Participant

    It doesn’t have anything to do with permalinks, as the page itself is not reloading. The error lies somewhere in the Javascript.

    And actually, I’ve discovered it. I originally had just a single event created in the current month, and so there were no navigation links on the month view to go to the next and previous months.

    And if you look in the tribe-events-ajax-calendar.js file, you will see on lines 22 and 29:

    $nav_link = $( '[class^="tribe-events-nav-"] a' ),
    ...
    base_url = $nav_link.first().attr( 'href' ).slice( 0, -8 );

    Since the navigation links are not present, it is retrieving the incorrect base URL and defaulting to ‘/’, hence why the URL rewriting is not working properly in my case.

    I just verified this is the case by creating an event for next month, which causes the navigation links to appear, and this issue does not appear.

    Hope that helps anyone else who has stumbled upon this issue. Hope you can get some kind of patch worked out for this in the future. Thanks!

Viewing 1 post (of 1 total)