WordPress.org

Plugin Directory

Changeset 595485


Ignore:
Timestamp:
09/06/12 17:20:02 (20 months ago)
Author:
MarcusPope
Message:

Added fix for infinite redirect issue with custom post types in wordpress core [JOBID: admin]

Location:
root-relative-urls/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • root-relative-urls/trunk/readme.txt

    r570702 r595485  
    22Contributors: marcuspope 
    33Donate link: http://www.marcuspope.com/ 
    4 Tags: url, links, admin, multisite, content, permalink 
     4Tags: url, links, admin, multisite, content, permalinks, migration, absolute urls 
    55Requires at least: 3.2.1 
    66Tested up to: 3.2.1 
     
    1919It supports path-based MU Installations, but does not support domain-based MU sites due to architectural deficiencies in the Wordpress core. 
    2020 
     21Version 1.5 fixes an infinite redirect problem that is a result of a core bug in WordPress.  If you have problems with the <!--more--> tag or permalinks for custom post types, please read the FAQ or new Install Steps for support. 
     22 
    2123== Installation == 
    2224 
     
    3032 
    31331. Activate the plugin through the 'Plugins' menu in WordPress Admin 
     341. Save your permalink settings twice in a row (Admin > Settings > Permalinks : Save Changes) x2 
    32351. You're done! Now you can happily browse and manage your site from any URL, including an IP address if you wish. 
    3336 
    3437== Frequently Asked Questions == 
     38 
     39= Infinite 301 Redirects, Custom Post Type Content and --More-- links = 
     40 
     41There was a long outstanding support issue regarding these problems that I think is resolved from my plugin perspective. 
     42 
     43The core issue (http://core.trac.wordpress.org/ticket/21824) is still not fixed, and the temporary workaround for that problem is to go into Admin > Settings > Permalinks, and click "Save Changes" twice in a row, letting the page reload between each save. 
     44 
     45This should fix the rewrite rules used internally to WordPress to route URLs to custom post content, more links. 
    3546 
    3647= What is a Root-Relative URL? = 
     
    98109== Changelog == 
    99110 
     111= 1.5 = 
     112* Bug fix: Fixed an infinite redirect problem caused by a core bug in WordPress - http://core.trac.wordpress.org/ticket/21824 
     113 
    100114= 1.4 = 
    101115* Bug fix: Discovered url fragment identifiers were being dropped entirely from urls, which broke a couple ajax behaviors - most noticeably the menu editor. 
  • root-relative-urls/trunk/sb_root_relative_urls.php

    r570702 r595485  
    99Author: Marcus E. Pope, marcuspope 
    1010Author URI: http://www.marcuspope.com 
    11 Version: 1.4 
     11Version: 1.5 
    1212 
    1313Copyright 2011 Marcus E. Pope (email : me@marcuspope.com) 
     
    264264            3 
    265265        ); 
     266 
     267        add_filter('redirect_canonical', function($redirect, $requested) { 
     268            //Fixes infinite redirect loop caused by WP Core bug: http://core.trac.wordpress.org/ticket/21824 
     269            if (MP_WP_Root_Relative_URLS::proper_root_relative_url($redirect) == 
     270                MP_WP_Root_Relative_URLS::proper_root_relative_url($requested)) { 
     271                return false; 
     272            } 
     273        }, 10, 2); 
    266274    } 
    267275} 
Note: See TracChangeset for help on using the changeset viewer.