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

When server action is enabled, title property in metadata does not work. #51286

Closed
1 task done
zenato opened this issue Jun 14, 2023 · 3 comments
Closed
1 task done
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template. locked Metadata Related to Next.js' Metadata API.

Comments

@zenato
Copy link

zenato commented Jun 14, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:44 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T8103
    Binaries:
      Node: 18.15.0
      npm: 9.5.0
      Yarn: 1.22.19
      pnpm: 8.5.1
    Relevant packages:
      next: 13.4.6-canary.3
      eslint-config-next: 13.4.5
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.3

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js)

Link to the code that reproduces this issue or a replay of the bug

https://github.com/zenato/test-next-metadata-with-server-action

To Reproduce

  1. Open your browser to view the main page.
  2. Make sure the page title is 'Main'.
  3. Click the link to go to the login page.
  4. Confirm that the title has changed to 'Login'.
  5. Click the link again to go to the main page.
  6. But the title doesn't change.

Describe the Bug

After the title has been changed once, the title does not change any more even if the page is changed again. It works fine if you don't enable the exeperimental.serverAction flag in the next.config setting.

Expected Behavior

Even if the executive.serverAction flag is enabled, metadata title should be reflected normally.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

@zenato zenato added the bug Issue was opened via the bug report template. label Jun 14, 2023
@github-actions github-actions bot added area: app App directory (appDir: true) Metadata Related to Next.js' Metadata API. labels Jun 14, 2023
@JJooaa
Copy link

JJooaa commented Jun 14, 2023

I think its a duplicate of this #49409

@shuding
Copy link
Member

shuding commented Jun 14, 2023

Yes this is a duplicate of #51286.

@shuding shuding closed this as completed Jun 14, 2023
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template. locked Metadata Related to Next.js' Metadata API.
Projects
None yet
Development

No branches or pull requests

3 participants