Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291227

Creating a direct html link to href=/?q=user/login is causing the entire site to infinite redirect loop

$
0
0

When creating link or a plain a tag html link such as href="/?q=user/login" inside a block or node with PhpFilter is causing the entire site to an infinite redirect loop to http://localhost/?q=user.

At first it will will start from 5 redirects and the page load, then it will double, triple upto infinite that the browser will complain the the request redirect will not finish.

This occurs on any request being on the home page or admin page is returning an infinite loop.

Sample code in the block:

<?php
 
 
if(user_is_logged_in()){
      global
$user;
      print
"Welcome ".$user->name.'&nbsp;|&nbsp;<a href="/?q=user">My Account</a>&nbsp;|&nbsp;<a href="/?q=user/logout">Log out</a>';
  }else{
?>
Log in | Register
<?php
 

?>

Response sample:
Content-Language: en
X-Generator: Drupal 7 (http://drupal.org)
Link: ; rel="canonical",; rel="shortlink"
Location: http://localhost/?q=user
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked


Viewing all articles
Browse latest Browse all 291227

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>