1

We are having a problem with passfaster.org, a driving instructor web site.

Every so often, various link stops working when clicked on from the home page. To resolve this, I have cleared the site cache, checked in all items and purge the expired cache. It could be that just one of these fixes the problem, I haven't had a chance to dig deeper yet as I have to wait for it to stop working before I can try something new.

When clicked on, instead of taking you to the correct page of the site visitors are taken to www.passfaster.org/index.php?width=1280&height=800

Does anyone know why this stops working every so often?

Kind regards

James

1

Its not the cache issue, rather a small javascript code in your page is redirecting it to the above mentioned url. Here is the code that is causing the issue:

<script type="text/javascript">window.location = "/index.php?width="+screen.width+"&height="+screen.height;</script>
  • Hi Nagarjun, Thanks for that. I've had a look but I can't seem to find it. Can you see from your end, where this is being loaded from? Kind regards – favdes Jun 24 '15 at 15:41
  • Think I've just found it. The following code was located in the template.php file: if(isset($_SESSION['screen_width']) AND isset($_SESSION['screen_height'])){ } else if(isset($_REQUEST['width']) AND isset($_REQUEST['height'])) { $_SESSION['screen_width'] = $_REQUEST['width']; $_SESSION['screen_height'] = $_REQUEST['height']; header('Location: ' . $_SERVER['PHP_SELF']); } else { echo '<script type="text/javascript">window.location = "' . $_SERVER['PHP_SELF'] . '?width="+screen.width+"&height="+screen.height;</script>'; } – favdes Jun 24 '15 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.