PhoenixKit 1.7.102: PDF uploads work in the media browser
PhoenixKit 1.7.102 fixes PDF uploads in the media browser. Every PDF failed validation without a message and was never stored, because it was given a file type the media records do not accept. PDFs are now stored as documents.
Migration V106 lets a project and a template have the same name, so creating a project from a template under that template’s name works. V105 adds the tables for the upcoming CRM module. Core now holds the Legal module’s translations in German, French, Italian and Polish, with refreshed Russian and Spanish. Leaf 0.2.10 stops the editor from growing wider than its container. Install hints now suggest mix igniter.install phoenix_kit.
Upgrading
Run mix phoenix_kit.update for V105 and V106.
Full release notes: PhoenixKit 1.7.102
1.7.102 · 29 April 2026
Added
- V105 migration: CRM tables for the upcoming
phoenix_kit_crmplugin (PR #507)phoenix_kit_crm_role_settings— one row per role withenabled BOOLEAN NOT NULL DEFAULT falseso existing roles stay opted out until explicitly enabled. PK onrole_uuid; FK →phoenix_kit_user_roles(uuid)ON DELETE CASCADEphoenix_kit_crm_user_role_view— per-user, per-scope view preferences (column selection, ordering, filters). UUIDv7 PK; unique(user_uuid, scope); index on(user_uuid); FK →phoenix_kit_users(uuid)ON DELETE CASCADE.scopeis a string like"role:<uuid>"or"companies"
- V106 migration: split
phoenix_kit_projects.nameuniqueness across templates and real projects (PR #510)- Replaces V101’s single global unique index on
lower(name)with two partial unique indexes:phoenix_kit_projects_name_template_index WHERE is_template = trueandphoenix_kit_projects_name_project_index WHERE is_template = false - Lets a template
"Onboarding"and a real project"Onboarding"coexist, unblockingProjects.create_project_from_template/2for the common reuse-the-template-name path down/1recreates V101’s single global index; lossy if a template and a real project share a name post-V106 — resolve duplicates before rolling back
- Replaces V101’s single global unique index on
- Legal module i18n — translations across
de/fr/it/plplus refreshedru/es. Newde/fr/it/plPOs created viamix gettext.merge --localewith properPlural-Formsheaders (Germann != 1, Frenchn > 1, Italiann != 1, Polish 3-form rule). Pre-existing non-emptymsgstrvalues preserved (PR #509) lib/phoenix_kit_web/legal_gettext_manifest.ex— re-emits the 50 translatable strings used byphoenix_kit_legalso the gettext extractor (which doesn’t walk into deps) records them into core’s POT. Never called at runtime; pure extraction target with refresh procedure documented in the moduledoc (PR #509)css_sources/0accepts string entries —@callback css_sources()widened from[atom()]to[atom() | String.t()]. Strings flow throughformat_source/2→source_for_path/1(absolute paths emit@source "<abs>";verbatim, relative get the standard../../prefix); atoms continue to resolve via parent app’s mix.exs deps. Lets modules mix OTP-app atoms with literal path strings — first known consumer isphoenix_kit_legal, which ships a path-dep absolute fallback alongside its OTP-app entry so both Hex and path-dep installs work without parent-app toggles. Backwards compatible: existingdef css_sources, do: [:phoenix_kit_my_module]keeps working unchanged (PR #509)
Changed
- Bumped
leafeditor dependency~> 0.2.6 → ~> 0.2.10and the matching CDN URL inpriv/static/assets/phoenix_kit.jsso the runtime loader pulls the same version. Includesmin-width: 0+ toolbar-wrap fixes so the editor stops claiming an unbounded intrinsic width on mount (PR #508) priv/gettext/default.potcleanup — dropped ~900 phantom msgids left over from modules extracted to standalone packages (billing, publishing, entities, etc.) (PR #509)
Fixed
application/pdfuploads in MediaBrowser.determine_file_type/1returned"pdf", but theFilechangeset validatesfile_typeagainst["image", "video", "audio", "document", "archive", "other"]— every PDF upload silently failed validation and never reached any bucket. Now mapsapplication/pdf→"document", matching how form-upload integrations already classify PDFs (PR #507)- V106
COMMENT ON TABLEversion values were off by one (upwrote'105'instead of'106',downwrote'104'instead of'105'). The migration framework reads this comment as the source of truth for the migrated version, so on the incremental V105 → V106 upgrade path the comment never advanced past'105'— V106.up would replay on every deploy and the admin dashboard /mix phoenix_kit.statuswould report a stale version. Fresh installs masked the bug becausehandle_version_recording/4stamps the final version on multi-step runs and overrode V106’s bad write. Caught in review of PR #510 and amended in place since V106 had not yet shipped to Hex
PhoenixKit 1.7.102. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.