Skip to content

Instantly share code, notes, and snippets.

@Alexnder
Last active November 11, 2015 07:40
Show Gist options
  • Save Alexnder/ed1448b5d98f399346ca to your computer and use it in GitHub Desktop.
Save Alexnder/ed1448b5d98f399346ca to your computer and use it in GitHub Desktop.
UTM fix when 301 redirect, query pass ez publish 4.3

In file index.php Change $moduleResult = $module->handleError( eZError::KERNEL_MOVED, 'kernel', array( 'new_location' => $objectHasMovedURI ) ); To:

$moduleResult = $module->handleError( eZError::KERNEL_MOVED, 'kernel', array(
  'new_location' => $objectHasMovedURI,
  'query' => $_SERVER['QUERY_STRING']
) );

In file kernel/error/view.php Before header( "Location: " . $location ); Add this fix:

if (strlen($extraErrorParameters['query']) > 0) {
 $location .= "?".$extraErrorParameters['query'];
}
header( "Location: " . $location );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment