<p>Turns out this was a bug that only occurred if the existing URL didn't have an URI associated with it.  i.e. <code>http://craft.dev?foo=bar</code>.</p>

<p>It's been fixed and will be included in the next 2.5 beta release (or the first 2.5 public release if you don't want to swap to the beta track).</p>

CC BY-SA 3.0
2015-11-24T20:39:54.737Z
Ah, spot on, thanks Brad - the issue was on the home page so sounds like that's it. Out of interest, is there a schedule (even a rough one) for the 2.5 public release yet? No problem if not, but thought I'd check.
Nick F
CC BY-SA 3.0
2015-11-24T21:49:02.877Z
Yup... read in here: http://pixelandtonic.com/blog/craft-2.5-beta
Brad Bell
CC BY-SA 3.0
2015-11-25T01:02:56.363Z
Yikes, sorry, missed that! Next week - that's excellent. Thanks again.
Nick F
CC BY-SA 3.0
2015-11-24T19:30:28.830Z
2015-11-24T19:30:28.830Z
Brad Bell
<p>I'm trying to use <a href="http://buildwithcraft.com/docs/templating/craft.request#getQueryStringWithoutPath" rel="nofollow"><code>craft.request.getQueryStringWithoutPath()</code></a> to handle query strings on pagination, but for some reason it always seems to return an empty string. If I try <code>craft.request.getQueryString()</code> I get the query string as expected (eg. <code>foo=bar</code>), but with the exact same URL <code>getQueryStringWithoutPath()</code> gives me an empty string.</p>

<p>Am I doing something wrong? Could this be a server configuration issue (I'm using Apache 2.4 with a fairly default configuration)? Or could this be a Craft bug...? I'd be grateful for any help!</p>

CC BY-SA 3.0
2015-11-24T19:51:35.457Z
Per Brad's answer, this is a bug and has been fixed for the next release. Closing as a "bug report".
Lindsey D
<pagination><request>
Why does craft.request.getQueryStringWithoutPath return an empty string?
# Why does craft.request.getQueryStringWithoutPath return an empty string?

(Asked by: username_0 on 2015-11-24)

I'm trying to use [`craft.request.getQueryStringWithoutPath()`](http://buildwithcraft.com/docs/templating/craft.request#getQueryStringWithoutPath) to handle query strings on pagination, but for some reason it always seems to return an empty string. If I try `craft.request.getQueryString()` I get the query string as expected (eg. `foo=bar`), but with the exact same URL `getQueryStringWithoutPath()` gives me an empty string.

Am I doing something wrong? Could this be a server configuration issue (I'm using Apache 2.4 with a fairly default configuration)? Or could this be a Craft bug...? I'd be grateful for any help!

**Tags:** pagination, request

> **Comments:**
> **username_1**: Per Brad's answer, this is a bug and has been fixed for the next release. Closing as a "bug report".  

---

## 1 answers

### Answer by username_2 on 2015-11-24. Score: 1

Turns out this was a bug that only occurred if the existing URL didn't have an URI associated with it. i.e. `http://craft.dev?foo=bar`.

It's been fixed and will be included in the next 2.5 beta release (or the first 2.5 public release if you don't want to swap to the beta track).

> **Comments:**
> **username_0**: Ah, spot on, thanks Brad - the issue was on the home page so sounds like that's it. Out of interest, is there a schedule (even a rough one) for the 2.5 public release yet? No problem if not, but thought I'd check.  
> **username_2**: Yup... read in here: http://pixelandtonic.com/blog/craft-2.5-beta  
> **username_0**: Yikes, sorry, missed that! Next week - that's excellent. Thanks again.  

---

