Page MenuHomePhabricator

Special:EntityPage should return 404 for non-existing MediaInfo-Entities on commons
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

What should have happened instead?:

  • It should show a 404 error instead of redirecting to a completely unrelated page

Note:

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

It should show a 404 error instead of redirecting to a completely unrelated page

I’m not convinced this should happen. Currently, Special:EntityPage doesn’t return 404 directly; making this depend on the entity type would be inconsistent.

Perhaps we can return a general 400 error, like we do for Special:EntityPage/X. Or perhaps redirect to something like Special:BadTitle/M123? (Special:BadTitle returns 404, so in that case Special:EntityPage would at least consistently redirect to a 404 page.)

Special:BadTitle/M123 would be also ok with me. For me, it would be not so much depending on the entity type, but rather that it should have some sensible "not found" response. Redirecting to the (missing) page of a non-exisitng entity is sensible. Showing a completely unrelated page just because its page-id happens to match the numeric part of the entity-id is not sensible to me.

I'm fine with an algorithm that is roughly as follows:
Is it not an Entity? -> 400 Bad title error
Is it an existing Entity? -> redirect to Entity
Is it know where the Entity would be located if it would exist? -> redirect to page of missing Entity (P1, Q7, ...)
Otherwise: Redirect to Special:BadTitle/<entity-id> or show directly some 404 error