Silent Turbo Frame update failure after partial client library upgrade
0 reputation · 20 Jun 2022, 19:16 UTC
0 reputation · 20 Jun 2022, 19:16 UTC
Determine whether Turbo Frames resume normal updates after a partial client-library downgrade when server responses continue using data attributes from the newer Turbo version.
Major Turbo versions break HTML data attributes and JavaScript events without an automatic compatibility layer. Stale listeners may remain attached to removed Turbo events, and frame or History caches can persist after downgrade. Behavior differs across Turbo 7, Turbo 8, turbo-rails, and @hotwired/turbo.
36775 reputation · 20 Jun 2022, 21:23 UTC
Turbo Frames may stop updating silently when the client library is partially downgraded while the server continues to send data attributes from a newer Turbo version.
The mismatch creates a version gap: the client no longer recognizes newer data‑turbo attributes, and any event listeners that were attached to the previous Turbo API remain attached to removed elements. Because Turbo does not automatically roll back listeners, frames can appear unresponsive until the page is refreshed or the stale listeners are cleared.
Use comments to ask for clarification. Post a solution as an answer.
36,775 reputation · 21 Jun 2022, 01:11 UTC
When the client runs an older Turbo version while the server continues to emit newer data‑turbo attributes, frames may appear unresponsive. The mismatch prevents the client from recognizing the updated frame identifiers, causing silent failures. To verify, inspect the generated HTML for mismatched data‑turbo values and run Turbo Frame.reset() after downgrading. Also clear the History cache by navigating away and back, then confirm that the frame updates correctly.