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

getStaticPaths regression after v4.15.5 #11990

Closed
1 task
jwv opened this issue Sep 13, 2024 · 1 comment · Fixed by #11993
Closed
1 task

getStaticPaths regression after v4.15.5 #11990

jwv opened this issue Sep 13, 2024 · 1 comment · Fixed by #11993
Assignees
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)

Comments

@jwv
Copy link

jwv commented Sep 13, 2024

Astro Info

Astro                    v4.15.5
Node                     v22.2.0
System                   Windows (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/tailwind
                         astro-icon
                         @astrojs/sitemap

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

After update to v4.15.5 getStaticPaths stop work as usually.

For example:
pages/archive/[...slug]/[...page].astro

export async function getStaticPaths({ paginate }) {

  const paths = [
    {
      slug: 'news/july-2024',
      items: ['item 1', 'item 2', 'item 3', 'item 4', 'item 5', 'item 6'],
      contentType: 'news',
      monthYear: 'july-2024',
    }
  ];

  return paths.flatMap((path) => {
    return paginate(path.items, {
      params: { slug: path.slug },
      props: {
        contentType: path.contentType,
        monthYear: path.monthYear,
      },
      pageSize: 2,
    });
  });
}

With v4.15.5 returns a error:

A getStaticPaths() route pattern was matched, but no matching static path was found for requested path /archive/news/july-2024.
Possible dynamic routes being matched: src/pages/archive/[...slug]/[...page].astro.

With v4.15.4 runs without errors and route without any problem.

Don't know maybe something with #11983

What's the expected result?

Routing without any errors.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-vxjmv8?file=src%2Fpages%2Farchive%2F[...slug]%2F[...page].astro&on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Sep 13, 2024
@matthewp matthewp self-assigned this Sep 13, 2024
@matthewp matthewp added the - P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) label Sep 13, 2024
@github-actions github-actions bot removed the needs triage Issue needs to be triaged label Sep 13, 2024
@matthewp
Copy link
Contributor

Thanks, i'll take a look and hopefully get a new patch out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants