Thanks to visit codestin.com
Credit goes to github.com

Skip to content

revalidateTag inside dynamic parallel route slot does not work as expected #64517

@beckerei

Description

@beckerei

Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/cool-resonance-hmp58x

To Reproduce

  1. build & start
  2. navigate to /foo via link (dynamic)
  3. click button "revalidate Tag"

Current vs. Expected behavior

The resource associated with the tag has not been updated.
I'm expected the resource to be updated.

Downgrading next to 14.1.0 in the provided example fixes the problem.

This may only apply to the dev server:
Sometimes the resource seems to be updated when a certain time has passed (30sec?), but to me the pattern is random.
You can also sometimes see different cached data between the two routes (I expect this to be because we have a page and a catchall page in the main slot - optional cache all does not work, this is why it's duplicated)

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 14.2.1 // Latest available version is detected (14.2.1).
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

App Router

Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local)

Additional context

We upgraded our application to 14.2.0 only to see that our revalidation no longer has any effect, but we also can't really downgrade since we before got occosionally/reproducible blank pages that have been fixed in the release.

I'm currently setting experimental.staleTimes.dynamic to 0 as a hot-fix, but it's also not helping all of time.

We usually have a redirect after the action, but for some other actions the resource is being updated without a redirect afterwards, in these cases it seems that the revalidation works as before.

Our app folder structure is similar as in the provided example this is why I adapted it.
We have a main page that has paginated content and the parallel route slot can render a sidepanel containing additional information where some things can also be updated. Updated data needs to be reflected in the panel as well as the main slot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions