Welcome Guest, Not a member yet? Register   Sign In
Pagination query string bug
#1

[eluser]Phil Sturgeon[/eluser]
With enable_query_strings enabled it will try and use a query string style parameter instead of a uri segment CI style URL - fair enough.

However if I pass the pagination class the follow config item I would expect this behaviour to be overridden.

Code:
$config['page_query_string'] = FALSE;[code]

To make this happen, it is only a small change. Lines 123 and 173 need to be modified as such.

From:

[code]if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)

To:

Code:
if (($CI->config->item('enable_query_strings') === TRUE AND $this->page_query_string !== FALSE) OR $this->page_query_string === TRUE)

I have broken my rule of replacing code in core libraries as I believe this should make it into the next release asap. Please can you see that it does?
#2

[eluser]Robert Wallis[/eluser]
I agree. I had to do the same thing, replacing lines 123 and 173 to use "AND" logic.

The reason is that CI does not support foreign languages in the URI. So I had to set enable_query_strings to TRUE in my main config file to support urls like:
Code:
http://example.com/edit/外语字/

Where 外语字 is a word in a foreign language, like the screen name of the user that they type in which could be anything.

Please either fix page_query_string, or fix the enable_query_strings to only block out query string characters, instead of every non-English alphabet character.
#3

[eluser]electronik_0[/eluser]
Gracias pude resolver el problema que tenia al activar lo query_enable
#4

[eluser]PeterGreffen[/eluser]
Thanks! I was wondering what I did wrong... and could not find it...
#5

[eluser]osci[/eluser]
I'm sorry to unbury this old thread, but I was going through the pyrocms code to study and got through MY_Pagination class. There I noticed the bug.
Code:
/* ADDED PURELY TO AVOID BUG LISTED HERE:
* http://ellislab.com/forums/viewthread/112390/
*
* Basically with $config['enable_query_strings'] enabled, we cannot stop
* this class from using the rubbish query string style links for pagination
* even if $config['page_query_string'] = FALSE; is passed to pagination/
*
* DELETE THIS EXTENTION AS SOON AS THIS BUG IS RESOLVED!!
*/

I checked in my latest reactor system and the issue is still there.

Is there any reason this change hasn't come yet to reactor?
#6

[eluser]InsiteFX[/eluser]
If you look at the Reactor there is not much going on at all!
And look at the bug list also.

InsiteFX
#7

[eluser]Unknown[/eluser]
Thanks - i had the same problem!
Pfefferspray




Theme © iAndrew 2016 - Forum software by © MyBB