Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2nd pagination not in phase with real status #6106

Open
tenzap opened this issue Feb 27, 2022 · 2 comments
Open

2nd pagination not in phase with real status #6106

tenzap opened this issue Feb 27, 2022 · 2 comments

Comments

@tenzap
Copy link
Contributor

tenzap commented Feb 27, 2022

I have page/view that calls twice $this->pagination->create_links();

		<?php echo $this->pagination->create_links();?>
		<?php echo $this->pagination->create_links();?>

However, only the first call really reflects the new state: if I went to page 2, it shows that I'm on page 2. While the 2nd call reflects that I'm still on page 1 (and it never gets updated).

Am I missing something?

HTML output:

<ul>
    <li><a href="http://localhost/index.php/phonebook/index/" data-ci-pagination-page="1" rel="prev">&lt;</a></li>
    <li><a href="http://localhost/index.php/phonebook/index/" data-ci-pagination-page="1" rel="start">1</a></li>
    <li><span id="current">2</span></li>
</ul>
<ul>
    <li><span id="current">1</span></li>
    <li><a href="http://localhost/index.php/phonebook/index/20" data-ci-pagination-page="2">2</a></li>
    <li><a href="http://localhost/index.php/phonebook/index/20" data-ci-pagination-page="2" rel="next">&gt;</a></li>
</ul>

Current workaround: call it once, store the result in a variable that can be reused at will.

tenzap added a commit to tenzap/Kalkun that referenced this issue Feb 27, 2022
- Header & Footer pagination links weren't in sync. Especially the footer
didn't reflect real status.
See bcit-ci/CodeIgniter#6106
tenzap added a commit to tenzap/Kalkun that referenced this issue Feb 27, 2022
- Header & Footer pagination links weren't in sync. Especially the footer
didn't reflect real status.
See bcit-ci/CodeIgniter#6106
tenzap added a commit to kalkun-sms/Kalkun that referenced this issue Feb 27, 2022
- Header & Footer pagination links weren't in sync. Especially the footer
didn't reflect real status.
See bcit-ci/CodeIgniter#6106
tenzap added a commit to kalkun-sms/Kalkun that referenced this issue Feb 27, 2022
- Header & Footer pagination links weren't in sync. Especially the footer
didn't reflect real status.
See bcit-ci/CodeIgniter#6106
@narfbg
Copy link
Contributor

narfbg commented Mar 2, 2022

I don't know ... It looks like it could be a bug, but even if we knew all of the options that you've used, it would still be very hard to debug this. I'm afraid you'd have to pinpoint it yourself if you want it fixed.

@tenzap
Copy link
Contributor Author

tenzap commented Mar 9, 2022

Thanks. I may stay with my workaround: call it once, store the result in a variable that can be reused at will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants