grantmakers / profiles

Grantmakers.io Profiles - Summary profiles for all US-based foundations who have filed electronic IRS Form 990-PF
MIT License
1 stars 1 forks source link

Create redirects for remaining edge cases #1

Closed chadokruse closed 7 years ago

chadokruse commented 7 years ago

Function resides here: https://github.com/grantmakers/profiles/blob/source/_plugins/portfolio-generator.rb#L55

Example This => https://www.grantmakers.io/profiles/v0/426315781-j-wesley-graham-tw-wells-fargo-bank-na--mac-n8000-0027/

Should redirect to => https://www.grantmakers.io/profiles/v0/426315781-j-wesley-graham-tw-wells-fargo-bank-na-94-3080771/

Old link remains indexed by Google, but new profile contains a new name. There IS a redirect for the old name with the new slugify method, but Google is still following the link created with the old slugify method.

Impacts ~63 profiles (limiting reach to names with multiple spaces)

db.getCollection('aggregated').find({
  'organization_name_prior_year': /\s\s/,
  $where: 'this.organization_name != this.organization_name_prior_year'
}).count()

Other examples: https://www.grantmakers.io/profiles/v0/680397208-hachman-family-foundation-co-butterfield-and-co-cpas-inc/

Prior name HACHMAN FAMILY FOUNDATION CO BUTTERFIELD AND CO CPAS INC Current name HACHMAN FAMILY FOUNDATION CO BUTTERFIELD AND CO CPAS INC Note extra space between 'BUTTERFIELD and 'AND'