Pagination inside nocache always returns page 1 when full static caching ignores query strings
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by tracing the POST /!/nocache request and the pagination resolver that reads the current page; the issue identifies query string removal before that resolver as the failure point. Reproduce with full static caching and ignore_query_strings enabled, then verify that ?page=2 renders page 2 inside the nocache region while the surrounding page uses the same static cache entry. An open linked pull request already addresses this issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug description
With full-measure static caching enabled and ignore_query_strings set to true, a paginated collection inside a nocache region always renders page 1, even when visiting ?page=2.
The browser correctly passes the original URL, including ?page=2, to POST /!/nocache. However, the query string is removed before the pagination resolver reads the current page.
How to reproduce
- Create a collection named posts containing more than six published entries.
- Enable static caching:
'strategy' => 'full',
'ignore_query_strings' => true,
'nocache' => 'cache', - Add a paginated listing inside a nocache region, for example in Blade:
<statamic:nocache>
<statamic:collection from="posts" paginate="true" limit="6" as="posts">
@foreach ($posts as $post)
<p>{{ $post['title'] }}</p>
@endforeach
<p>Page {{ $paginate['current_page'] }}</p>
</statamic:collection>
</statamic:nocache>
- Clear the static cache and visit the page to populate it.
- Visit the same page with
?page=2. - Wait for the nocache request to finish.
Expected behavior
The nocache region renders page 2, while the surrounding page continues using the same static cache entry.
Actual behavior
The nocache response contains page 1.
Logs
Environment
Environment
Laravel Version: 13.40.0
PHP Version: 8.4.23
Composer Version: 2.10.2
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en
Cache
Config: CACHED
Events: CACHED
Routes: CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: file
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file
Storage
public/storage: NOT LINKED
Livewire
Livewire: v4.4.8
Statamic
Addons: 7
License Key: Not set
Sites: 1
Stache Watcher: Enabled
Static Caching: full
Version: 6.40.0 PRO
Statamic Addons
alt-design/alt-redirect: 1.9.0
aryehraber/statamic-captcha: 1.18.0
marcorieser/statamic-livewire: 5.3.4
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
- Ngôn ngữ chính
- PHP
- Star
- 4.9k
- Fork
- 647
- Merge trung bình
- 23 giờ 42 phút
- Pull request đã merge (30 ngày)
- 148
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của statamic/cms
-
tags
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
antlers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
antlers modifiers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 57/100
statamic/cms#15832 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Multisite: switching site in the collection listing opens a different entry, not the localizationĐang mởmultisite
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Icinga/icinga-notifications-web#645 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
OpenMage/magento-lts#5865 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
neos/flow-development-collection#3655 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Codeinwp/themeisle-companion#1014 ·
Maintainer thường phản hồi trong vòng 1 ngày