WordPress.org

Ready to get started?Download WordPress

Forums

WordPress 3.3.1 breaks my permalinks (7 posts)

  1. colinwiseman
    Member
    Posted 2 years ago #

    We recently tried to upgrade to 3.3.1 but this caused many of our posts to break. This is because of the following link:

    $title = preg_replace('|-+|', '-', $title);

    (formatting.php line 892)

    so this URL
    http://www.elephantjournal.com/2012/04/in-defense-of-yoga-pants--yogis-of-the-west--karen-macklin/

    would be changed into

    http://www.elephantjournal.com/2012/04/in-defense-of-yoga-pants-yogis-of-the-west-karen-macklin/

    and this won't be found as the URL "in-defense-of-yoga-pants-yogis-of-the-west-karen-macklin" doesn't exist in the database.

    Is there a way to turn this stop function sanitize_title_with_dashes from getting run? without me having to hack the code of WordPress - otherwise this issue will appear again when we next get an update.

    Thanks

    Colin

  2. Tara
    Member
    Posted 2 years ago #

    have you tried:

    -deactivating ALL plugins temporarily to narrow down the problem. If the problem goes away, activate them individually (one-by-one) to find the problematic plugin.

    If you don't have access to your admin area, try deactivating plugins manually via FTP or phpMyAdmin.

    -switching to the unedited default theme (that came with your version of WP) for a moment by renaming your current theme's folder in wp-content/themes. The idea is to force WordPress to fall back to the default theme to rule out any theme-specific issue.

    If you don't have access to your admin area, then access your server via FTP or SFTP or whatever file management application your host provides.

  3. colinwiseman
    Member
    Posted 2 years ago #

    Hey t-p,

    It's not my plugins but the core code of WordPress that is breaking my permalinks. By commenting out that line referenced above the site works fine. I just don't want to comment it out.

    Unless do you think it could be a plugin calling the code by accident?

    Colin

  4. Tara
    Member
    Posted 2 years ago #

    try it to find out.

    -If the above steps do not resolve the issue, download WordPress again and replace your copies of everything EXCEPT the wp-config.php file and the /wp-content/ directory with fresh copies. This should replace your core files without changing your content and settings in wp-config.php file and the /wp-content/ directory.

    ALWAYS BACKUP EVERYTHING FIRST

  5. colinwiseman
    Member
    Posted 2 years ago #

    Thanks, but this is a fresh copy of WordPress that am using on my dev machine that breaks my permalinks.

    I had to sit and add an echo "here" at so many points to track down the line of code that changed urls from "a---b" to "a-b". Removing all plugins now.

  6. colinwiseman
    Member
    Posted 2 years ago #

    Ps I am on windows using iis7.0 but everything has been working amazingly until this latest version.

  7. colinwiseman
    Member
    Posted 2 years ago #

    Definitely not the plugins causing the issue. So yeah that line of code in the /wp-includes/formatting.php is causing all my URLs with multiple dashes to break.

    Gonna have to remove it and remember to remove each upgrade I suppose.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.