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

Forum returns 404 for correct links #4108

Closed
traumschule opened this issue Jan 21, 2023 · 9 comments · Fixed by #4318
Closed

Forum returns 404 for correct links #4108

traumschule opened this issue Jan 21, 2023 · 9 comments · Fixed by #4318
Labels
bug Something isn't working community-dev issue suitable for community-dev pipeline high-prio qa-tested-ready-for-prod release:1.5.0

Comments

@traumschule
Copy link
Contributor

traumschule commented Jan 21, 2023

Sometimes this happens and one has to open the same link again which then works.

STR

  1. open a forum thread
  2. edit the thread number in the address bar
  3. hit enter
    => 404
@traumschule traumschule added bug Something isn't working to-triage labels Jan 21, 2023
@dmtrjsg
Copy link
Contributor

dmtrjsg commented Jan 27, 2023

Not enough info to triage..

@dmtrjsg dmtrjsg closed this as completed Jan 27, 2023
@traumschule
Copy link
Contributor Author

updated description, please try these steps to reproduce.

@traumschule traumschule reopened this Jan 29, 2023
@dmtrjsg
Copy link
Contributor

dmtrjsg commented Jan 30, 2023

Just checked and it seems for existing threads it works correclty.

Tried with 93,94,95.

for non-existent threads it correctly shows 404. .

@traumschule Which ones dd you struggle with?|

@traumschule
Copy link
Contributor Author

It's any thread. To reiterate the steps:

  1. CTRL + l "https://pioneerapp.xyz/#/forum/thread/12" => Found
  2. CTRL + l "https://pioneerapp.xyz/#/forum/thread/13" => Not found
  3. CTRL + l "https://pioneerapp.xyz/#/forum/thread/13" => Found

Routing fails when the thread page / component is active and only works when jumping from another page/component like categories.

@dmtrjsg dmtrjsg added the community-dev issue suitable for community-dev pipeline label Jan 31, 2023
@traumschule
Copy link
Contributor Author

Another way to reproduce this is to open this post and click on any thread link.

@thesan
Copy link
Member

thesan commented Feb 15, 2023

Could be related to #4173

@traumschule
Copy link
Contributor Author

i wonder if we want a 404 page instead of routing back to /proposals for example?

@traumschule
Copy link
Contributor Author

The problem seems to be that after changing the thread ID in the address bar isLoading stays false and thread is empty while the new one is being loaded. When the address changes, isLoading needs to be set false.

  useEffect(() => {
    if (!isLoading && !thread) {
      history.replace('/404')
    }
  }, [isLoading, thread])

in ForumThread.tsx. Does this make sense?

@chrlschwb chrlschwb moved this from Up-Next to Dev In progress in Pioneer Community Product Development Apr 10, 2023
Pioneer Community Product Development automation moved this from Dev In progress to Closed - On Prod Apr 21, 2023
thesan added a commit that referenced this issue Apr 21, 2023
* fixes #4108 Forum returns 404 for correct links

* fixes #4318 handle errors for forum threads

* #4108 handle thread errors

* Add dot to error description

Co-authored-by: Theophile Sandoz <theophile.sandoz@gmail.com>

* Fix use `useRefetchQueries`

---------

Co-authored-by: ilya Smiyukha <ilya.smiyukha@touchcast.com>
Co-authored-by: Theophile Sandoz <theophile.sandoz@gmail.com>
@thesan thesan reopened this Apr 21, 2023
@thesan thesan added the qa-task label Apr 21, 2023
@chrlschwb chrlschwb moved this from Closed - On Prod to Ready to Test in Pioneer Community Product Development Apr 26, 2023
@ivanturlakov
Copy link

✅ Tested on https://dao-git-dev-joystream.vercel.app/#/forum/thread/12

Forum returns related pages for correct links

@chrlschwb chrlschwb moved this from Ready to Test to Tested - Ready for Prod in Pioneer Community Product Development Apr 28, 2023
@thesan thesan removed the qa-task label Jun 1, 2023
Pioneer Community Product Development automation moved this from Tested - Ready for Prod to Closed - On Prod Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community-dev issue suitable for community-dev pipeline high-prio qa-tested-ready-for-prod release:1.5.0
Projects
Development

Successfully merging a pull request may close this issue.

5 participants