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

Clicking on Collection by username redirects to blank page #2611

Closed
PiyushChandra17 opened this issue Nov 17, 2023 · 3 comments
Closed

Clicking on Collection by username redirects to blank page #2611

PiyushChandra17 opened this issue Nov 17, 2023 · 3 comments
Labels

Comments

@PiyushChandra17
Copy link
Contributor

p5.js version

2.9.2

What is your operating system?

Mac OS

Web browser and version

Chrome and 117.0.5938.132

Actual Behavior

Clicking on Collection by username redirects to blank page with a horizontal line on top

redirection.mov

Expected Behavior

It should redirect logged in user to their own created sketches page

Steps to reproduce

Steps:

  1. Open the editor web app
  2. Click on hello! username
  3. Click on my collections
  4. Click on collection name in table
  5. Click on collection by username
  6. Verify it redirects to blank page
@mhsh312
Copy link
Contributor

mhsh312 commented Nov 17, 2023

The error is in the following code:

<p className="collection-metadata__user">
{this.props.t('Collection.By')}
<Link to={`${hostname}/${username}/sketches`}>
{owner.username}
</Link>

The <Link> here takes the user to http://<hostname>/<username>/collections/http://<hostname>/<username>/sketches while it should take them to http://<hostname>/<username>/sketches.

Changing the Link to the following fixes the issue:
<Link to="/sketches">{owner.username}</Link>

Before:
image

After:
image

Please assign this issue to me so I can make a PR.

@lindapaiste
Copy link
Collaborator

@mhsh312 You are exactly right about the problem and the solution.

@raclim I fixed this months ago in #2253, though it seems I didn't mention it in the PR notes. Can we get this merged? It's really frustrating to see people reporting errors that should have been fixed a long time ago.

<p className="collection-metadata__user">
{t('Collection.By')}
<Link to={`/${username}/sketches`}>{username}</Link>
</p>

@raclim
Copy link
Collaborator

raclim commented Nov 17, 2023

@lindapaiste yeah we can probably get that PR in for this Monday's PATCH release, sorry about that! Feel free to go ahead with adding any other PRs that you'd want to see out soon to the milestones as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants