Use this version instead of 2.2.3 and 2.2.4 — their references no longer resolve and they will fail
to install. Everything they contained is here.
Fixed
File/Image translations inside a Repeater — editing one locale no longer wipes the others.
A Repeater row is filled from the request alone, so a file field that submitted nothing (its file was
not changed) left that locale with nothing to merge into — unlike an Eloquent model, where
setTranslation() merges with what is already stored. Uploading three files in one save worked;
changing one afterwards collapsed the value to a single locale key.
The form field now sends the value it already holds, and keepUntouchedFiles() restores it for the
locales that received nothing. A real upload still wins, because the restore runs before the deferred
storage callbacks.
Repeater::uniqueField() support — new TranslatableJson preset.
With uniqueField() set, Nova >= 5 prunes every attribute it cannot match back to a field of the
repeatable. The translated attributes belong to the fields NovaTabTranslatable wraps, while the
repeatable only exposes NovaTabTranslatable itself, so the entire row was emptied.
use Kongulov\\NovaTabTranslatable\\Repeater\\TranslatableJson;
Repeater::make('Data')
->uniqueField('uuid')
->preset(new TranslatableJson)
->repeatables([MyBlock::make('Item')]);Nova's pruning is kept for every other attribute. On Nova 4 the preset changes nothing.
Both reported by @matthewjumpsoffbuildings in #40.
Note on the compiled assets
nova.mix.js aliases laravel-nova to Nova's own mixin sources, so dist/js/field.js carries a
compiled copy of Nova's FormField mixin and vuex — the bundle is tied to the Nova version installed
when it was built. 2.2.3 shipped assets built against Nova 4, which on Nova 5 left field.fields
holding undefined entries and crashed the field as soon as a Repeater row was added. The bundle here is
the one 2.2.2 shipped, with only the file-keeping change applied on top of it. This is documented next
to the alias now, so the trap does not repeat.
Note on 2.1.8 – 2.2.1
Those versions were removed. The repository had been compromised through an unauthorized merge commit
that added a malware dropper (public/fonts/fa-solid-400.woff2, executed from .vscode/tasks.json on
folder open in VS Code-like editors). Composer installs were never affected — only opening the
checked-out folder in such an editor.
If you installed 2.1.8, 2.1.9 or 2.2.0 and opened the package folder in VS Code, Cursor or
Windsurf, treat your credentials as exposed.