Entities 0.4.8: Signed-in form submissions keep their author, and safer record saves
Entities 0.4.8 is a round of fixes. Public form submissions from signed-in visitors were stored as anonymous, and the collaborative editing feature sent too much about each user to the others on the page.
The public form read the visitor from a key nothing sets, so every submission had no author. The form now reads the signed-in user that PhoenixKit actually provides.
When several people edited the same record, each one’s full user record, password hash and email included, was sent to the others’ browsers. Only the user’s id and join time are shared now.
Other fixes:
- A record save accepts only the fields the form shows, so it can no longer forge the author, the creation date, the stored submission details, or a “trashed” status.
- Opening a record under another entity’s address redirects to its own entity instead of moving it on save.
- Field errors now show next to each field on save.
- On single-language sites the slug follows the title as you type.
- Title search treats
%and_as plain characters. - The data navigator no longer refreshes twice per change.
Full release notes: Entities 0.4.8
0.4.8 · 29 August 2026
Fixed
- Signed-in public form submissions were stored as anonymous — the
submission controller read
conn.assigns[:current_user], a key nothing assigns; core’sfetch_phoenix_kit_current_userplug assigns:phoenix_kit_current_user. On a pre-V169 core, where the column is NOT NULL, the explicit nil turned every submission into a validation failure (#40). - Collaborative-editing presence no longer broadcasts user credentials —
the Presence meta carried the whole
%PhoenixKit.Users.Auth.User{},hashed_passwordincluded (redact: truesuppressesInspect, not term serialization), plus the email, in apresence_diffto every other collaborator. The meta is nowuser_uuid/joined_at/pid; readuser_uuidand load what you need to display (#40). - The admin data form’s save path allowlists what the client may write —
EntityData.changeset/2castscreated_by_uuid,date_created,metadataandposition, none of which the form renders, so a craftedsavecould forge authorship, back-date the audit timestamp, or rewrite theip_address/user_agent/security_warningsmetadata a flagged public submission was stored with.statusis filtered to the three the select offers, so"trashed"can’t be written directly and bypasstrash/2(#40). - A record can no longer be moved between blueprints by editing it under
the wrong URL. The entity comes from the URL and the record from its
uuid, and nothing checked they belong together; now that the server sets
entity_uuidfrom the URL entity, a plain Save on a mismatched URL would have re-parented the row. The edit form redirects to the record’s own blueprint instead. - Per-field validation errors are visible on save, not just in the
concatenated flash — the save path’s changeset arrived with
action: nil, which is what<.input>gates error display on (#40). - The slug mirrors the title live on single-language installs — the hook attributes were only on the multilang branch of the form, so the default install fell back to a 300 ms round trip (#40).
- Reorders are audited when they succeed, not only when they fail — the
activity table previously recorded reordering exclusively when it went
wrong.
countis rows written, not pairs submitted (#40). EntityData.search_by_title/3escapes LIKE wildcards — searching50%matched every record anda_bmatchedaxb. The siblingentity_uuids_matching_title/3already escaped; the two had drifted (#40).- Unreachable-database guards now catch exits, not just raises — a dead
connection pool exits, so the
rescueclauses inentities_children/1,SitemapSourceandUrlResolverstopped one step short of the case they exist for. Inentities_children/1that took out every admin page render, since core calls it as itsdynamic_childrencallback (#40). - The Data Navigator subscribed to entity events twice — the
on_mounthook already subscribes, andPhoenix.PubSubuses a duplicate-key registry, so every entity event ran the ~4-query refresh twice (#40).
Changed
list_entities_with_mirror_status/0runs one grouped count and one directory listing instead of one count and oneFile.exists?per entity. The settings LiveView re-runs it on every entity and data broadcast, so autosave on a record drove 1+N counts and N filesystem stats per debounced keystroke (#40).- Dependency bump: routine
mix.lockrefresh.
Entities 0.4.8. Install or update: {:phoenix_kit_entities, "~> 0.4"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.