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

Add redirects for old election profile page links #2188

Closed
1 task
patphongs opened this issue Jul 16, 2018 · 4 comments · Fixed by #2235
Closed
1 task

Add redirects for old election profile page links #2188

patphongs opened this issue Jul 16, 2018 · 4 comments · Fixed by #2235
Assignees
Milestone

Comments

@patphongs
Copy link
Member

patphongs commented Jul 16, 2018

@lbeaufort commented on Thu Jun 28 2018

What we're after: After changing the design of the election profile pages, we changed the way data is organized in tabs on each election page. Unfortunately, the old links are still available and so we need to go back and add redirects for the old election profile page deep links.

The old links that are affected include:
/?tab=totals
/?tab=contributions
/?tab=spending-by-others

This applies to all past /data/elections/senate, /house, and /president pages.
Example: https://www.fec.gov/data/elections/president/2012/?tab=contributions

We should add redirects for the old election profile page deep links.


@AmyKort commented on Mon Jul 16 2018

@patphongs could you also take a look at this ticket to see if we need to update the work or the link?


@AmyKort commented on Mon Jul 16 2018

Oh wait. Is this the ticket to update the links?


@patphongs commented on Mon Jul 16 2018

@AmyKort Yes this is the one, I'm going to move it to fec-cms, since this actually needs to be done within the urls in python since nginx does not have the capabilities to pass arguments through to the resultant URL.

Completion criteria:

  • Use the URLS.py file to change the route to point to the appropriate view
@johnnyporkchops
Copy link
Contributor

From the comment above:
This applies to all past /data/elections/senate, /house, and /president pages. Example: https://www.fec.gov/data/elections/president/2012/?tab=contributions

Trying to go to anything other than /data/elections/president/<cycle> returns 404.
So regardless of tab arguments, urls like, for example: http://www.fec.gov/data/elections/senate/2012 or http://www.fec.gov/data/elections/senate/2008 all return nothing.

What URL pattern is supposed to be redirected for house and senate?

@johnnyporkchops
Copy link
Contributor

From what I gather, house and senate pages with similar URLs to the following never had a tabbed interface so there would be no need to redirect URLs for these pages based on a tab argument on the URL: http://www.fec.gov/data/elections/senate/2012....

@JonellaCulmer
Copy link
Contributor

@johnnyporkchops All election profile pages including House, Senate and Presidential, had a tabbed interface for the different datetables.

Here is an example of an Alabama senate page that needs a redirect: https://www.fec.gov/data/elections/senate/AL/2012/?tab=contributions.
Needs to redirect to: https://www.fec.gov/data/elections/senate/AL/2012/

House example: https://www.fec.gov/data/elections/house/AL/03/2012/?tab=contributions
Needs to redirect to: https://www.fec.gov/data/elections/house/AL/03/2012/

@johnnyporkchops
Copy link
Contributor

johnnyporkchops commented Jul 31, 2018

Thanks @JonellaCulmer, I just realized this when looking at the second screenshot example on @patphongs Pennsylvania districting-language PR. But had no idea how one might navigate to land on a page like that other than knowing the URL

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

Successfully merging a pull request may close this issue.

3 participants