Pagination inside nocache always returns page 1 when full static caching ignores query strings

クローズ
#15,787 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@lazerg がすでに取り組んでいます。

2026年11月4日 から。

  • #15788 @lazerg による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
laravel, php
領域
backend, databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

caching nocache
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
  1. Create a collection named posts containing more than six published entries.
  2. Enable static caching:
    'strategy' => 'full',
    'ignore_query_strings' => true,
    'nocache' => 'cache',
  3. 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>
  1. Clear the static cache and visit the page to populate it.
  2. Visit the same page with ?page=2.
  3. 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

主要言語
PHP
スター
4.9k
フォーク
647
平均マージ
23時間 42分
マージ済み PR(30日)
148

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

statamic/cms のほかの issue

statamic/cms の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。