Support » Plugin: The Events Calendar » [Plugin: The Events Calendar] Pretty URLs do not work

  • After having spent a good number of hours investigating this, my only conclusion is that the Pretty URL structure is so restrictive that it cannot work.

    Or rather, it will not work when a site uses anything other that the permalink structure for which you have coded.

    Cases where this will not work :

    • WordPress installed in a different directory to default
    • WordPress installed in a directory above the root
    • Permalinks not displaying the wordpress installed directory
    • Permalinks having a custom structure – eg /%postname%/

    I tried to see when the call to the classes function filterRewriteRules would be called without success.

    My tests have confirmed these results when using the default theme as well as my own.

    Are there any plans to fix this functionality ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Since Justin appears to be back, bumping this so that he sees it 🙂

    Any fix yet?

    Same problem here..

    I just ran into this bug. My WordPress is installed in a folder called wp but the site address is at the root of the site. This is pretty common and explained here:

    I’m using Version 1.6.4 of the-events-calendar and this is the solution I found. It involves editing the the-events-calendar.class.php file so these changes will be overwritten if you upgrade the plugin. Make a backup before this.

    Find the function called filterRewriteRules and change the line:

    $base = str_replace( trailingslashit( get_option( 'siteurl' ) ), '', $url );


    $base = trailingslashit( str_replace( trailingslashit( get_option( 'home' ) ), '', $url ) );

    (Note to other developers– using camelCase is not recommended.)



    Ok same problem here…. Not Working with Permalinks having a custom structure like : /%postname%.html



    Any idea ?

    I encountered this problem running 3.0.4 on IIS6. It seemed to be triggered by the creation of additional categories, because previously I had entered two events on the site (still under development) and tested them and styled them. No problems.

    Today I added about 5 more categories to the site and began building a blog-style news page. I created a few more posts and assigned them the new “news” category, created a page for them, added styles, etc, no problem.

    Then I began entering in some new events. They were added to the grid view of the calendar just fine. And they also appeared in the list view just fine. But when I clicked on the post title (the permalink) I would get a Page Not Found error every time. I tried removing the new categories, turning off pretty urls, resetting my permalink structure, and nothing seemed to work. I also checked for plugin conflicts but still no dice.

    Researching solutions I came across this thread and implemented the fix detailed above by @monodistortion (mostly out of desperation, my wordpress install is at the root of the site and I’m using custom permalink structure, but that’s the case with all of my installs and I’ve never encountered this bug before…). Swapping out that line of code fixed the issue.

    Posting my experience in case it is useful for anyone else. Honestly not sure of the mechanics behind what I changed or why it happened to work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: The Events Calendar] Pretty URLs do not work’ is closed to new replies.