Skip to content

Conversation

@MKwenhua
Copy link
Contributor

@MKwenhua MKwenhua commented May 31, 2017

Purpose:

A recent bug cropped up where the page https://hiring.careerbuilder.com/portal/ppcaliforniaState300 was not getting the tables_data from Cortex. This was because the URL was saved in cortex as https://hiring.careerbuilder.com/portal/PPCaliforniaState300

For example:
https://api.cbcortex.com/api/v1/webpages/feed?url=https://hiring.careerbuilder.com/portal/PPCaliforniaState300 is now a 404 because I changed the URL to lowercase.

but this is ok:
https://api.cbcortex.com/api/v1/webpages/feed?url=https://hiring.careerbuilder.com/portal/ppcaliforniastate300

JIRA:

https://cb-content-enablement.atlassian.net/browse/EM-1451

Steps to Take On Prod

n/a

Changes:

  • Changes to setup

    • n/a
  • Architectural changes

    • adds the citext extension
  • Migrations

    • bundle exec rake db:migrate
  • Library changes

    • n/a
  • Side effects

    • n/a

Screenshots

  • Before

  • After

QA Links:

With Capotalization:

Without:

How to Verify These Changes

  • Specific pages to visit

    • n/a
  • Steps to take

    • go to legacy cortex on http://web.cortex-4.development.c66.me
    • create a webpage with capitalization and save it.
    • make sure the api works with the lowercase url(how it's passed from employer)
  • Responsive considerations

    • n/a

Relevant PRs/Dependencies:

n/a

Additional Information

need to run bundle exec rake db:migrate also this could be alternatively solved just by context.params.url.downcase which may actually be more performant by a few milliseconds(possibly) .

@MKwenhua MKwenhua merged commit e3ab5ee into develop Jun 13, 2017
@toastercup toastercup deleted the bugfix/Webpage-URL-Capitalization-Mismatch branch July 5, 2017 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants