Glitch Button Remix and View Source buttons have the wrong URL

When using the Glitch Button, the URLs that it generates for the Remix on Glitch and View Source buttons are incorrect.

On landscape-with-trees, those URLs are:

https://glitch.com/edit?utm_source=button&utm_medium=button&utm_campaign=glitchButton&utm_content=landscape-with-trees/#!/remix/landscape-with-trees

And

https://glitch.com/edit?utm_source=button&utm_medium=button&utm_campaign=glitchButton&utm_content=landscape-with-trees/#!/landscape-with-trees

These URLs lead to 404 pages. Notice that the path component of the URL appears after the query parameters. The correct links should be:

https://glitch.com/edit/#!/landscape-with-trees

And:

https://glitch.com/edit/#!/remix/landscape-with-trees

Both of those URLs with the query params before the #! do not send me to a 404 page.

It’s correct for us to have those query params before the hash fragment, it’s the URI standard and we’ve seen remix links being broken when we had params after the hash fragment otherwise.

1 Like

By the way, I had only tested your app’s button, and the links you copied in your thread here, on Chrome. I also just tried it on Firefox and didn’t see any 404s there either.

(It’s probably not even a problem for us to remove those query params anyway since we don’t use the button anymore, so I’ll look into that…but that doesn’t solve why those pages are 404’ing for you!)

1 Like

Interesting that it’s putting the url parameters before that last / before the hash

https://glitch.com/edit / #!/x-x-x
                       ^ ^
                       1 2

It adds a bunch of ?x=y&... at location 1, but as Jenn points out as the correct place “before the hash fragment” should be location 2.

https://glitch.com/edit#!/landscape-with-trees without that slash seems to redirect fine though :person_shrugging:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.