Skip to content
Snippets Groups Projects

Fixed pattern matching for external and internal page links #2133

Merged Ben requested to merge fix/external-pages-regex-2133 into master

Summary

Pattern matching for the /p/ pages is broken on production. To replicate, go and click the iOS link in the footer.

Our system is seeing the URL itunes.apple.com/us/app/minds-com/id961771928%3Fmt Seeing that it contains '/p' and thinking that it is an internal page

This happened because the system was looking simply for indexOf('p/')

For this fix I have upgraded that check to a regex check, in a commonly held service.

image

Steps to test

Ignore the first iPhone link - that is invalid data that for now is trapped in the sandbox. (If there is now only 1 link for iPhone, include it in the test, we may have found the missing schema and fixed).

image

  1. Not logged in, check the links on the bottom footer, ensure they're all working
  2. Log in, check the links on the newsfeed footer
  3. Check the links on the actual /p/ pages, like https://www.minds.com/p/terms-of-service/
  4. Check the pro footer hasn't been effected https://www.minds.com/pro

Estimated Regression Scope

The components touched by this are: Footer, register homepage and newsfeed.

I think the worst-case scenario would be a failure in the Regex logic causing another pattern matching issue.

Edited by Ben

Merge request reports

Checking pipeline status.

Merged by Xander MillerXander Miller 5 years ago (Jan 14, 2020 6:34pm UTC)

Loading

Pipeline #109332593 waiting for manual action

Pipeline waiting for manual action for 1b46c45a on master

4 environments impacted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Emiliano Balbuena approved this merge request

    approved this merge request

  • Looks good! Internal links seem to be working OK on the sandbox site.

  • Ben added StatusRequires Changes label and removed 1 deleted label

    added StatusRequires Changes label and removed 1 deleted label

  • Ben added 1 commit

    added 1 commit

    Compare with previous version

  • Ben added 1 deleted label and removed StatusRequires Changes label

    added 1 deleted label and removed StatusRequires Changes label

  • Ben resolved all threads

    resolved all threads

  • Mark Harding approved this merge request

    approved this merge request

  • Mark Harding added StatusReady to Merge label and removed 1 deleted label

    added StatusReady to Merge label and removed 1 deleted label

  • Re-tested, working OK on review site.

  • Emiliano Balbuena approved this merge request

    approved this merge request

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading