CRM 0.4.1: No more duplicate route warnings in the host app
CRM 0.4.1 fixes a build problem in apps that use the CRM. The Comparison page’s route was declared twice, so every host router compiled with two warnings about a clause that can never match. An app built with mix compile --warnings-as-errors failed because of it. The second declaration is gone.
The page itself is unchanged: same address, same screen, in both the plain and the language-prefixed routes. Only the name of the generated path helper changes, to :admin_crm_comparison, matching the Contacts, Companies and Lists pages.
Upgrading
If your own code calls the old :crm_comparison or :crm_comparison_locale helper by name, switch to :admin_crm_comparison or to PhoenixKitCRM.Paths.comparison/0.
Full release notes: CRM 0.4.1
0.4.1 · 31 July 2026
Fixed
- The Comparison route was declared twice — once by its
admin_tabs/0entry (which core turns into a route) and once explicitly inPhoenixKitCRM.Routes— so every host router compiled with two “this clause cannot match because a previous clause matches the same pattern” warnings, which fails a host runningmix compile --warnings-as-errors. The explicit declaration is gone.
Changed
- Following from that fix, the generated path helper for the Comparison page is
now
:admin_crm_comparison(was:crm_comparison/:crm_comparison_locale). Routing itself is unchanged — same path, LiveView, action, pipeline andlive_session, in both the root and the/:localescope — and this matches how the other list-index tabs (Contacts, Companies, Lists) already resolve. A host calling the old helper by name must switch to:admin_crm_comparisonor toPhoenixKitCRM.Paths.comparison/0.
Added
- A regression guard for the above:
PhoenixKitCRM.Routesis now asserted to declare no path that anadmin_tabs/0/settings_tabs/0entry already generates a route for, so a re-introduced duplicate fails this module’s own suite instead of the host’s compile.
CRM 0.4.1. Install or update: {:phoenix_kit_crm, "~> 0.4"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.