Help - All new Pages create a redirect for / back to the new page

2 months ago | grafis (Member)

Since upgrading to 2.1.27 all our new Pages create an automatic re-direct for root / to the new page.
Any help appreciated!

I've uninstalled and re-installed the plug-in. I'm afraid deleting all existing Re-directions (ouch) wont do the job - Looks like I need to somehow remove all information about the plugin from the WP DB and start from scratch?

Read responses...

Responses

  1. grafis:

    Posted 2 months ago by Member

    Hmmm deleted all data via the Plugin option. uninstalled, re-installed and the issue immediately returned.
    Perhaps the new version?

  2. grafis:

    Posted 2 months ago by Member

    I deleted the plug-in, removed left over items in the WP DB table WP_Options and then re-installed 2.1.26 and still no go. Any new Page creates a "Post" redirection for root /

  3. Simon:

    Posted 2 months ago by Member

    There is an entry in the Bugtracker. I posted a possible solution for this bug. You can try it on your own risk ;-)

  4. grafis:

    Posted 2 months ago by Member

    Thanks Simon, for now I've disabled the plugin and am using .htaccess for critical pages.

  5. grafis:

    Posted 1 month ago by Member

    Any movement on this 3.0 bug?

    "Save new pages/posts as drafts, then Publish." seems to be the fix which is problematic to explain to others, or some possible code changes.

  6. Eric Daams:

    Posted 1 month ago by Member

    Posted this in a few other threads about this same issue, so hope you don't mind me posting my solution here too:

    Disabling Redirection works, but I needed Redirection to be active, so if you're in the same boat, here's what you need to do. Unfortunately you'll need to do some editing of the plugin files, as well as some fiddling in your database:

    1. The redirection problem is occurring because the plugin created a redirect when you first hit save or publish on the post/page. This means there is a row in your database that you need to remove. So either through phpMyAdmin or your favourite SQL client, log into your database and find the wp_redirection_items table (it will be wp_2_redirection_items if you're using the Multi-User option). Under the 'url' column, find the one that just has '/' (or if you're on MU, it will be something like '/blog'). Delete that row.

    2. Try going to your front page. It shouldn't redirect anymore. If it does, then something went wrong in step 1 above.

    3. Assuming it's not redirecting anymore, here's how you prevent this from happening again whenever you write a new post or page. Either through FTP or the back-end plugin editor in WP, go to redirection/models/monitor.php.

    4. Find the following:

    function insert_old_post ()
    	{
    		global $post;
    	?>
    	<input type="hidden" name="redirection_slug" value="<?php the_permalink () ?>"/>
    	<input type="hidden" name="redirection_status" value="<?php echo $post->post_status ?>"/>
    	<?php
    	}
    

    5. Change it to:

    function insert_old_post ()
    	{
    		global $post;
    
    		if ( $post->post_status != 'auto-draft' ) {
    	?>
    	<input type="hidden" name="redirection_slug" value="<?php the_permalink () ?>"/>
    	<input type="hidden" name="redirection_status" value="<?php echo $post->post_status ?>"/>
    	<?php }
    	}
    

    6. Save the file. The plugin is now fixed.

    If you need a hand with any of this, or want me to do it for you, you can get in touch through my site's contact form: http://ericnicolaas.com/contact/

    Cheers,
    Eric

Reply

You must log in to post.

Home | Software | Terms & Conditions | Sitemap | John Godley © 2010