Improvements to new galaxy’s 404 error pages and redirects

Hello everybody,
thanks for the efforts on the new Galaxy - but redirects from old URLs are suboptimal in my opinion.

I have a lot of references in all my project documentations where I link to the appropriate content, e.g. Ansible Galaxy.
Users would expect to see the role, but instead they’re getting a 404 error and below that error similiar content, which usually fits:

It is functional, but the UX isn’t great. Are there any plans to improve this?

Best wishes,
Christian.

1 Like

@stdevel we debated this issue at length internally and kept running into the same challenge: how does the system know if geerlingguy/apache is a role or a collection?

In the old system my understanding was that geerlinguy.apache could not be both a role and a collection. In the new system it can. However, because of that we can’t make assumptions about what the user intended to see when they visit the url. Having the page in your screenshot was a compromise to eliminate the ambiguity of a role vs collection and give the user some breadcrumbs to find the content they intended to find.

We’re definitely open to suggestions for improving this.

2 Likes

I mean genuinely the issue here is that as it is right you’re presented with one of the most frustrating UX elements out there: Choices that aren’t choices.

With this example here, you presented with a page that demenostrates it clearly knows what you want but refuses to give it to you directly. The choice here is very clear, as there’s only one option.
And frankly that’s what the handling should be. If there is only a collection or a role, redirect to that. Maybe show a hint that the URL changed and if you’re the person maintaing the page, update the link, but that’s besides the point.
And only if there actually are two choices, do show this error page.

This will restore practically all old links instead of breaking them all, except for a few edge cases, and honestly that’s fine.

And if you want to get rid of these edge cases too, it’s also very simple. Before the migration only one of the other cold exist. That means the older of the two is the one that the link was pointing to before. This also prevents the possibility of someone accidentally killing their own links retroactively.

2 Likes

If there is only a collection or a role, redirect to that.

Great and simple idea to enhance this, thanks for sharing. I’m working with the UI devs on the team to make sure this is feasible. If so, we should be able to get this enhancement added and pushed up quickly.

3 Likes

If there is only a collection or a role, redirect to that.

Dispatch: redirect on 1 item by himdel · Pull Request #4441 · ansible/ansible-hub-ui · GitHub should fix this :slight_smile:

1 Like

Thanks for the implementation. I’m not familiar with the tech stack being used here, so I’m not sure what kind of redirect it is, though for your Google scoring you should issue a permanent redirect.

No worries :). This is happening internally in the UI router, so there is no such distinction. Anything SEO-related would have to happen server-side.

(Also, a permanent redirect would break any new matching collections/roles.)