Getting blank page when navigating by link but not when opening page directly

Hello community, so I have a problem with a published page, when I click on it from the navbar or external url, the page opens empty, as a blank page and after if I reload the page works. can you please help me with this?

this may be an issue with the routing system in your app, what kind of code base are you seeing this issue with?

If you try publishing a new repo that is just using the defaults like next JS etc, are you still seeing this?

Hello Yang. We created a new blank project + repo and tried to reproduce the issue, but the pages loaded correctly. Later, we added an empty NextLink with an href into our main project’s Plasmic as a code-component (because an empty NextLink is no configured at all and should behave exactly the same as in the new project) but in this case the problem persisted. So, in my opinion, the problem has to be in some place of the Plasmic project, as the NextLink component is exactly the same in both codebases. I don’t know how to continue investigating currently. This is our Plasmic project link. Thanks.


@zonal_mammal, Can you guys try to investigate the issue. Thanks in advance

Hi @organic_ocelot
Is it possible to add me to your app host project codebase so I can clone it and look into it on my local system?

Because the shared plasmic project is using localhost as an app host so I can’t access it at the moment.

You should be able to access the project now @zonal_mammal

Hi David,
The issue is resolved by now. It was related to Nextjs dynamic routing and how it prioritize the dynamic routes.
It was caused due to route priority between [slug].tsx and [[...catchall]].tsx so to make sure that the NextLink consider catchall page, we have to use href and as property as follow

<NextLink href={"/[[...catchall]]"} as={href} />

I have shared a video in DM explaining the fix for it in detail. Let me know if you have any questions.

CC: @organic_ocelot

Thank you so much, @zonal_mammal. We will take a look :pray::skin-tone-3: