Skip to content

Fix featured activities filters (malformed component markup) - #3657

Merged
bernardhanna merged 1 commit into
masterfrom
fix/featured-filters-morph
Sep 14, 2026
Merged

bernardhanna merged 1 commit into
masterfrom
fix/featured-filters-morph

Conversation

@bernardhanna

Copy link
Copy Markdown
Collaborator

Summary

  • Repair the malformed markup in livewire/online-calendar.blade.php: a stray </div> closed <section>, leaving the component without valid nesting
  • Move language-code normalisation onto Event as display_languages / normalizeLanguageCode, so cards no longer print base.languages.eng
  • Reuse that helper in OnlineCalendar instead of a duplicate private copy

Root cause

Filters were reaching the server and returning correct data. Verified live: after changing the month, the Livewire response contained Showing 199 of 209 while the DOM still showed Showing 209 of 209, and wire:snapshot never advanced past all.

The cause is invalid HTML in the component view:

<section class="relative w-full pt-10 md:pt-32">
  ...
</div>   <-- stray, closes the section instead
</section>

The browser re-nests this into a different tree than the server rendered, so Livewire's morph cannot match nodes and silently leaves the DOM untouched. Pagination still worked because it navigates via URL rather than morphing.

This explains why removing the duplicate Livewire script and Alpine v2 did not fix filtering: those were real problems, but this one was underneath them.

Test plan

  • Hard refresh /featured-activities
  • Change Month and confirm the list and the "Showing X of Y" line update
  • Change Language and confirm filtering applies, including the empty state
  • Confirm no card shows base.languages.*
  • Confirm pagination still works and resets when a filter changes

Made with Cursor

The online calendar view closed a section with a stray </div>, so the browser
re-nested the DOM and Livewire could not morph the server response into the
page. Filter requests returned correct data that was never rendered.

Also move language-code normalisation onto the Event model so cards stop
printing raw keys such as base.languages.eng.

Co-authored-by: Cursor <cursoragent@cursor.com>
@bernardhanna
bernardhanna merged commit fc44b1e into master Sep 14, 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