Conflict with CiviCRM
-
The last update seems to have introduced an issue with the $redirection global variable, which is causing problems with one of our client’s CiviCRM installation.
To fix this, one of the developers on my team made changes to /wp-content/plugins/redirection/modules/wordpress.php
The changes made were: added two if(isset($redirection)) lines (and the closing curly braces).
function init() { global $redirection; $url = $_SERVER['REQUEST_URI']; // Make sure we don't try and redirect something essential if(isset($redirection)){ if ( !$this->protected_url( $url ) && !$redirection->hasMatched() ) { do_action( 'redirection_first', $url, $this ); $redirects = Red_Item::get_for_url( $url, 'wp' ); foreach ( (array)$redirects AS $item ) { if ( $item->matches( $url ) ) { $redirection->setMatched( true ); $this->matched = $item; break; } } do_action( 'redirection_last', $url, $this ); } } } function protected_url( $url ) { global $redirection; $part = explode( '?', $url ); if(isset($redirection)){ if ( $part[0] == str_replace( get_bloginfo( 'url' ), '', $redirection->url() ).'/ajax.php' || strpos($url, 'wp-cron.php' ) !== false ) return true; } return false; }
My concern of-course is that when we do the next update of the plugin, the issue will be re-introduced, if not resolved at the plugin core level.
- The topic ‘Conflict with CiviCRM’ is closed to new replies.