Skip to content

PhoenixKit 1.7.12: Blog posts fall back to another language instead of a 404

PhoenixKit 1.7.12 makes blog addresses more forgiving: a post missing in one language is shown in another, and a missing page leads to the closest one.

When a post does not exist in the requested language, the blog tries the other languages, the default one first. For a post addressed by date and time, it also tries other times on the same date. With no match, the visitor lands on the nearest page that exists with the notice The page you requested was not found. Showing closest match.

Language files that the Languages module does not know, such as af.phk, now work, and their dots in the language switcher show the right colour instead of always grey. Blog lists read each post’s language files once while loading instead of on every render, so they are faster for blogs with many translations.

Back links in the admin now point to /admin instead of /admin/dashboard.

Full release notes: PhoenixKit 1.7.12

1.7.12 · 24 December 2025

Blog Language Detection & Fallbacks

  • Content-based language detection - Custom language files (e.g., af.phk, test.phk) now work correctly without needing to be predefined in the Languages module
  • Flexible fallback chain for missing blog posts:
    • If requested language version doesn’t exist, tries other available languages (default language prioritized)
    • For timestamp posts: tries other times on the same date if specific time doesn’t exist
    • Falls back to blog listing with informative flash message when no alternatives found
  • Language switcher fix - Status dot colors now correctly show green/yellow/gray for unknown language files (previously all showed gray)

Blog Performance Improvements

  • Preload language statuses - language_statuses field added to posts when loading via list_posts and read_post
  • Eliminates redundant file reads - Previously O(posts × languages) file reads per page render, now reads files once during post loading
  • Faster blog listing pages - Significant performance improvement for blogs with many posts and language translations

PhoenixKit 1.7.12. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.