Description
Dependency
- Feature request: Warn when an invalid URL is the social media fields #2130
- Add tooltip for LinkedIn contact detail field #2197
- Add client-side validation for LinkedIn contact detail field #2199
- Add client-side validation and tooltip for Pinterest contact detail field #2182
- Add client-side validation and tooltip for Twitter contact detail field #2184
- Add client-side validation, tooltip, go to link and design for Instagram contact field #2201
- Add client-side validation, tooltip, go to link and design for Facebook contact field #2202
- Update tooltip text for all social media tooltips #2272
- Add a Go To Link for the website form field #2273
- Make sure links on public site actually work (especially if you’re modifying how links are stored on the database) (As per team discussion on Jan 6, 2025, no modification has been made on how the links are stored on the database, on the front end side within the contact details tab we are entering complete social media links.) Make sure social media links on public site actually work #2318
- Research ways to sanitize malformed social media links in the database #2294 Clean up/rationalize/fix any currently-malformed data in the database for these fields, perhaps with a batch operation.
Describe the bug
Maybe not really a bug but an issue with our data and form fields that allow invalid info.
Many of our listings have incorrect URLs for Instagram, Twitter, etc. because volunteers are entering @username in the fields rather than the properly formatted full URLs that our system is expecting
Noting this as an issue so we don’t forget it and because devs may be able to help find and fix errors, or solve a different way.
What we need to do
We need to clean these up, and prevent it from happening in the future.
Possible solutions
Some possible solutions:
- Fix our existing data — going through each of our listings and confirming and correcting the fields
- This could be a volunteer task and people check and correct these manually (we have about 500 listings total to review, but no easy to use UI to do the review)
- Or, perhaps, we could write and run scripts to turn usernames into full URLs
-
We could allow usernames and URLs both, and the website parses the field and displays the full URL appropriately
-
We could make all fields usernames-only and run a script to replace URLs with usernames in database, then display the full URL on the website
We should also display errors when field is incorrectly formatted to help data validators enter fields correctly
- Feature request: Warn when an invalid URL is the social media fields #2130 — Indicate an error when there’s an invalid URL in these fields — perhaps “Needs to be a full URL e.g. http…" (or explicitly support and validate usernames (i.e. remove the @ if needed))
and (optionally) prevent approval (and display error message) if these aren’t valid URLs
How to recreate
For example, go to this organization (unless it’s been fixed since this bug report):
https://foodoasis.la/organizations?latitude=34.081648&longitude=-117.740882&org=god%27s_pantry_-_pomona&id=4772
In the database:
<img width="838" alt="image" src="https://github.com/hackforla/food-oasis/assets/3376957/45ded83d-f8aa-490b-af7d-8555a6c5bd10”>
Our web site - Instagram icon has malformed URL (it should be going to Instagram.com/godspantry_org)
Video: https://github.com/hackforla/food-oasis/assets/3376957/f7a8a5c2-9397-4b8a-8f1e-a186fdf0de58
Metadata
Metadata
Assignees
Labels
Type
Projects
Status