Open confirmordeny opened 1 year ago
Redirection chain from /body/1
-> /body/body
-> /body/flint_town_council_flintshire
The first redirect is a result of this check: https://github.com/mysociety/alaveteli/blob/7bbf6e5e5e6f5c412a07c7af641068b898d56431/app/controllers/public_body_controller.rb#L24-L27
As MySociety::Format.simplify_url_part('1', 'body') #=> 'body'
as this function doesn't allowing url_name
starting with a integer.
The second redirect is because Flint, and 220+ other authorities, all have empty PublicBody::Translation
records for the Welsh (cy
) locale. When they were created because there are no name
in these translations when we generate the url_name
it is set to body
(same if using the CSV import). The second redirect only happens when viewing the English locale. Going to /cy/body/body
does not cause the redirect.
For what it's worth (probably nothing), Flint Town Council has been replaced by Birchanger Parish Council (in this error, not in terms of responsibility!).
https://www.whatdotheyknow.com/body/1 redirects to Flint Town Council, Flintshire as does https://www.whatdotheyknow.com/body/5000 and seemingly every other positive whole number.