Skip to content

Fix community Leading Teachers country filter and avatar placeholders - #3650

Merged
bernardhanna merged 1 commit into
masterfrom
fix/community-lt-country-filter-avatar
Sep 11, 2026
Merged

Fix community Leading Teachers country filter and avatar placeholders#3650
bernardhanna merged 1 commit into
masterfrom
fix/community-lt-country-filter-avatar

Conversation

@bernardhanna

Copy link
Copy Markdown
Collaborator

Summary

  • Filter Community Leading Teachers by the selected country_iso (same pattern as ambassadors), so country pages like Lithuania only show that country's teachers.
  • Always show an avatar on the map sidebar / ambassador cards, using local images/default.png when the stored avatar is empty, a known default, or fails to load from S3.
  • Encode teacher fields with @json to avoid JS breakage from special characters in names/paths.

Test plan

  • Open /community?country_iso=LT and confirm only Lithuanian Leading Teachers appear in the map sidebar (~16), with markers for their cities.
  • Confirm teachers without a real avatar show the local placeholder instead of a broken image.
  • Spot-check another country (e.g. FR/IT) still filters correctly.
  • php artisan test --filter=UserCommunityAvatarUrlTest

Made with Cursor

Filter approved teachers by the selected country so Lithuania (and others) are not buried in the full EU list, and fall back to a local default image when S3 avatars are missing or inaccessible.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bernardhanna
bernardhanna merged commit 6597baf into master Sep 11, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant