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

Fermée
#15,787 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@lazerg y travaille déjà.

Depuis le 4/11/2026.

  • #15788 par @lazerg — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
laravel, php
Domaine
backend, databases

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
PHP
Étoiles
4.9k
Forks
647
Merge moyen
23 h 42 min
PR mergées (30 j)
148

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de statamic/cms

Toutes les issues de statamic/cms

Issues similaires

Plus d'issues PHP

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.