Gatsby: Site Showcase permalink error

Created on 30 Dec 2018  路  9Comments  路  Source: gatsbyjs/gatsby

Description

The last several times I've clicked on "visit a site" from a site detail page and then, after browsing the site, use the back arrow to try and go back to the site showcase, there is just a blank white page staring at me!

Steps to reproduce

  1. Go to gatsbyjs.org/showcase
  2. Click on any site
  3. Click on "visit site" button
  4. Once the site loads, click on back arrow

Voila, there is probably a white page.

Expected result

You should see the detail page of the site that you just visited.
For example: https://www.gatsbyjs.org/showcase/www.howtographql.com (actually, @fk is this the correct URL I should expect for a permalink?)

Actual result

A blank white page. Here's the console errors:

screen shot 2018-12-29 at 9 33 15 pm

Environment

Chrome browser

stale? bug

Most helpful comment

We have couple of possibilities here:

  • wrap public PageRenderer in EnsureResources - we might hit same problems we hit before with react constantly updating and re-rendering that wasn't really figured out - need to research that.
  • add check if resources exist in public PageRenderer and return null if we don't have resources - also would need to adjust www code to fallback to non-modal version of showcase details page if background page would be null

All 9 comments

I can reproduce this in Chrome, but not Firefox.

Breaks on public-page-renderer-prod.js because pageResources is undefined

@pieh Related to ensure resources?

This only occurs when visiting a site via the modal, normal page works fine.

@pieh mentioned that we need to put we put _shouldShowModal_ in history

Still strange that it works on Firefox though

Also for reference: https://github.com/gatsbyjs/gatsby/pull/7501

Using directly has the caveat that you can't use it
unless the page resources are already loaded. [...] Otherwise it'll break.

which is exact scenario that is happening here

Firefox seems to be doing some magic by persisting a snapshot of the page and using that when one hits the back button. Refreshing on Firefox also causes this issue.

We have couple of possibilities here:

  • wrap public PageRenderer in EnsureResources - we might hit same problems we hit before with react constantly updating and re-rendering that wasn't really figured out - need to research that.
  • add check if resources exist in public PageRenderer and return null if we don't have resources - also would need to adjust www code to fallback to non-modal version of showcase details page if background page would be null

Just came across this. Some additional info, FWIW...

Can also replicate in Edge 42.17. Refreshing the page in Edge will load it normally. In Chrome (71.0.35) it does not; the error persists.

To reliably replicate the problem in Edge I need to restart the browser; in Chrome I just need a new incognito window.

Also: if I start on a Showcase site page (e.g., https://www.gatsbyjs.org/showcase/airbnb.io) there is no issue. I could only replicate it by first going to https://www.gatsbyjs.org/showcase.

Hiya!

This issue has gone quiet. Spooky quiet. 馃懟

We get a lot of issues, so we currently close issues after 30 days of inactivity. It鈥檚 been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

Thanks for being a part of the Gatsby community! 馃挭馃挏

Hey again!

It鈥檚 been 30 days since anything happened on this issue, so our friendly neighborhood robot (that鈥檚 me!) is going to close it.

Please keep in mind that I鈥檓 only a robot, so if I鈥檝e closed this issue in error, I鈥檓 HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

Thanks again for being part of the Gatsby community!

Was this page helpful?
0 / 5 - 0 ratings