WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
Pretty URLs do not work (7 posts)

  1. sgiddings
    Member
    Posted 3 years ago #

    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 ?

  2. sgiddings
    Member
    Posted 3 years ago #

    Since Justin appears to be back, bumping this so that he sees it :)

  3. brianj
    Member
    Posted 3 years ago #

    Any fix yet?

    Same problem here..

  4. monodistortion
    Member
    Posted 3 years ago #

    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:
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    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 );
    

    to:

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

    (Note to other developers-- using camelCase is not recommended.)
    http://codex.wordpress.org/WordPress_Coding_Standards#Variables.2C_Functions.2C_File_Names.2C_and_Operators

  5. heilios
    Member
    Posted 3 years ago #

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

  6. heilios
    Member
    Posted 3 years ago #

    Any idea ?

  7. judahstevenson
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic