Redirect from home page block means I can't export

Permalink
Hi I"m having an issue where I want to take a site onto my test server to do some major layout changes. However the site has a redirect block on the home page taking it to another sub page. Don't ask - its some cranky SEO suggestion that was made. But the problem is I now can't get to the block where this redirect is happening as it doesn't allow me to click in the editable area. When I take the site to my test server it keeps going to the redirect page on the live server which is hardcoded in...

http://www.concrete5.org/marketplace/addons/page-redirect/...

I have posted in the blocks profile but I am worried its no longer being supported. Any suggestions as how I can disable this block from doing the redirect, export the database, and then put it back on for the present live site?

chassa2556
 
cubewebsites replied on at Permalink Reply
Just edit the blocks' controller to
return false;
in the on_start and view methods and/or update the
view.php
if that's what's doing the redirect.

Make sure you keep a backup of the files you edit and then restore once you're done.
chassa2556 replied on at Permalink Reply
chassa2556
thanks for this - I've tried this but its still doing the re-direct. I seems to have embedded it in javascript if i look at firebug its still there. Driving me mad a bit as can't get into the site. I've tried taking the block out in view.php as you suggested but somehow its still doing the redirect. Any other ideas?
chassa2556 replied on at Permalink Reply
chassa2556
Hi - I'm no php coder would you be have a look at this code please and tell me where to put in the code you suggested in case I've got this wrong? This is the controller.php code..

<?php   
defined('C5_EXECUTE') or die(_('Access Denied.'));
define('PAULSREDIRECT_TYPE_ID',0);
define('PAULSREDIRECT_TYPE_URL',1);
define('PAULSREDIRECT_TYPE_REFERRER',2);
define('PAULSREDIRECT_WHEREMODIFY_NONE',0);
define('PAULSREDIRECT_WHEREMODIFY_FIRSTCHILD',10);
define('PAULSREDIRECT_WHEREMODIFY_LASTCHILD',11);
//define('PAULSREDIRECT_WHEREMODIFY_PREVIOUS',20);
//define('PAULSREDIRECT_WHEREMODIFY_NEXT',21);
define('PAULSREDIRECT_WHEREMODIFY_FIRSTPARENT',30);
define('PAULSREDIRECT_WHEREMODIFY_SECONDPARENT',31);
class PaulsRedirectBlockController extends BlockController {
   var $pobj;
   protected $btTable = 'btPaulsRedirect';
cubewebsites replied on at Permalink Reply
I would change:
//Redirect
   public function on_start(){
      global $c;
      //currently being edited?

to
//Redirect
   public function on_start(){
       return false;
      global $c;
      //currently being edited?


Once you've made the change, clear the Cache via the Dashboard

You can also try updating:
public function getRedirect(){
      $where= Cache::get('block', $this->bID.':where');


to

public function getRedirect(){
       return false;
      $where= Cache::get('block', $this->bID.':where');