Welcome Guest, Not a member yet? Register   Sign In
Problem with Pagination
#1

[eluser]Noisy[/eluser]
Ok here it comes:

The URL looks like: http://**.**/forum/news-und-ankuendigungen/1/test/&page=4
But it should look like this: http://**.**/forum/news-und-ankuendigungen/1/test/4

I have no idea why.
This is my config for the pagination
Code:
$page_config['base_url'] = base_url().'forum/'.$forenInfoArray['seo_titel'].'/'.$threadInfoArray['id'].'/'.seo(utf8_decode($threadInfoArray['titel'])).'/';
$page_config['total_rows'] = $post_anzahl;
$page_config['per_page'] = 2;
$page_config['uri_segment'] = 6;
$page_config['page_query_string'] = false;
//$page_config['query_string_segment'] = 'seite';

$this->pagination->initialize($page_config);
$page_numbers = $this->pagination->create_links();
            
[...]

$postsQuery = $this->db->get_where('forum_posts', $postsWhere, $limit, $offset);

What is wrong. Even if I set page_query_string on true nothing happens.
I'm so desperate. I have another pagination on my site and it's working fine.

Thanks in advance!
#2

[eluser]Noisy[/eluser]
Is there nobody with any idea? I can't believe hat Sad I Still think the version I wrote above i correct even though it's not working.
#3

[eluser]Unknown[/eluser]
hi i also have faced similar problem. There is a bug in the pagination library and its symptom is like
When (in cofig.php)
$config['enable_query_strings'] = TRUE;

Then (in Controller where pagination library used)
$config['page_query_string']=FALSE;

and it doesn't work.
Solution is just replace the pagination library from your system/libraries/Pagination.php
with this one from here http://www.mediafire.com/?cttwcnfnyzy
#4

[eluser]Noisy[/eluser]
Thank you. Now it's working fine.

Is this bug already reported? I Think this should be fixed soon, many users will become desperate like me :/
#5

[eluser]xwero[/eluser]
a solution would be to remove the enable_query_strings setting all together and use uri_protocol to have query string urls. I would only use one trigger so you can route query string urls too. This means the url will look like site.com/?trigger=dir/controller/method&other=params




Theme © iAndrew 2016 - Forum software by © MyBB