Page 1 of 1

Aruments added to URL

Posted: Wed Jun 17, 2009 9:26 am
by rob0514
This is an issue in Drupal 5. I've posted in the Drupal forum and haven't received any solutions. This feels like a sessions issue but only occurs on specific pages of the website. Any insight would be greatly appreciated. Thank you

When using table sort or pager the arguments become part of the url for example--

"leelanaunews.com/drupal/?q=view/classified_list&sort=asc&order=Expiration+Date" Becomes

"leelanaunews.com/drupal/?q=view/classified_list%26sort%3Dasc%26order%3DExpiration%2BDate&sort=desc&order=Expiration+Date"

And then grows expotentialy every time I click on a new link.

For a live example visit http://leelanaunews.com/drupal/?q=view/classified_list and play around with sort and pager.

Thanks

Re: Aruments added to URL

Posted: Wed Jun 17, 2009 9:40 am
by mattpointblank
Have a look at the output of the $_SERVER array - some of the items in there can be used to supply the URL to your script, minus the arguments, so you could change the Drupal code to use this, rather than (as it seems to be doing) using the entire URL to append arguments to.

Re: Aruments added to URL

Posted: Wed Jun 17, 2009 1:09 pm
by McInfo
Here is a simulation of what appears to be happening.

Code: Select all

<?php
header('Content-Type: text/plain');
 
// Simulates $_SERVER['QUERY_STRING']
$qs = '?q=view/classified_list&sort=asc&order=Expiration+Date';
 
// Collects everything after the first forward-slash
$extra = substr($qs, strpos($qs, '/') + 1);
 
// Puts the query string back together with $extra encoded
echo '?q=view/'.urlencode($extra); // The $_GET variables are appended after this
?>
Edit: This post was recovered from search engine cache.