Rebuild-Black-Business / RBB-Website

Website to help connect black-owned businesses with consumers and resources
https://www.rebuildblackbusiness.com/
MIT License
119 stars 72 forks source link

Some "Learn More" links are broken #264

Closed psalaets closed 4 years ago

psalaets commented 4 years ago

Steps

  1. Load https://www.rebuildblackbusiness.com/businesses in any browser (I tried FF, Safari and Chrome on macOS)
  2. Scroll down to the card for "Wild Haven Botanica LLC"
  3. Click the "Learn More" button

Expected

User ends up at https://www.wildhavenbotanica.com

Actual

User ends up at https://www.rebuildblackbusiness.com/www.wildhavenbotanica.com

More details

Seems like some of the business urls in your data (in airtable?) are being treated as relative links because they don't start with the protocol.

Screenshot

business url treated as relative url
psalaets commented 4 years ago

Ran this on all 5 pages of the business list

[...document.querySelectorAll('a[href]')]
   .map(a => a.attributes.href.value)
   .filter(href => href.startsWith('www'))
   .join('\n')

And found 5 urls that need attention

Also, the url for www.framedglenwood.com has a single trailing space in your data

elchris commented 4 years ago

@psalaets i just fixed these 5 in AirTable, and I also created a new view on AirTable called "Broken Website Field" which shows all records whose Website field is:

and there are over 240 of them so i'm just going thru the list. As I clean things up, updated data should show-up on the site within 2 hours

psalaets commented 4 years ago

Looks good to me, thanks