E-commerce 0.2.2: Products with non-Latin names get working addresses
E-commerce 0.2.2 fixes shop addresses for products, categories and shipping methods whose names cannot be turned into Latin letters, such as Chinese, Arabic or emoji.
Such a name produced an empty slug. The first one took the empty value in the unique index, so the next one could not be saved, and the product had no address to link to. Now the empty slug is never written. Instead the record gets a stable fallback slug starting with item-, and an old empty one is replaced on its next save. Renaming a shipping method no longer changes its slug, and a Cyrillic name no longer locks out later ones. A slug clash shows as a form error instead of a crash. Admin form labels no longer show faded under daisyUI 5.
Upgrading
The module now needs PhoenixKit core 2.6 or later.
Full release notes: E-commerce 0.2.2
0.2.2 · 14 August 2026
PR #21 plus the post-merge review in
dev_docs/pull_requests/2026/21-stop-empty-slugs/GROK_REVIEW.md.
⚠️ Requires phoenix_kit ~> 2.6. Shipping-method slugs call
Slug.put_slug/3 (core 2.4.0) and product/category unique constraints name
V171’s projection primary keys (core 2.6.0). A host still on 2.0–2.5 will not
resolve this release.
Fixed
- Empty slugs no longer lock a shop out of its own unique index.
Slug.slugify/2returns""for scripts it cannot romanize (CJK, Arabic, emoji). The oldextract_primary_slugindex was partial only onIS NOT NULL, so the first unromanizable title took the""key and the second could not be inserted. The generator never writes an empty result. - Unromanizable titles now get a storefront URL. Skipping the empty key
fixed the lockout but left CJK-only products as
/shop/product/— a catalog card with nowhere to go. They now receive a stableitem-<hash>fallback, shared by Product and Category viaPhoenixKitEcommerce.LocalizedSlug. A leftover{"en": ""}row self-heals into that fallback on its next save. - Slug resolution skips stored empty strings.
""is truthy, soSlugResolver.product_slug/2used to emit it intoproduct_url/2for a legacy CJK row and produce/shop/product/even when another language had a real slug. - Renaming a shipping method no longer moves its slug, and a Cyrillic
name no longer writes
""(which locked every later Cyrillic-named method out viaphoenix_kit_shop_shipping_methods_slug_unique). Shipping methods now use core’sSlug.put_slug/3. - A CJK/Arabic/emoji shipping-method name can be saved.
slugisNOT NULL, andput_slug/3leaves it blank when slugify returns"", which was a failed insert. The sameitem-<hash>fallback now fills it, suffixing-2on collision. - Product and category slug collisions are changeset errors on
:slug, not rawPostgrex.Error. Theunique_constraintnames follow V171’s projection primary keys. - Admin form labels were rendering at 60% opacity under daisyUI 5.
form-control/label-text/*-bordered/tabs-borderedmatch nothing in v5; the leftover.labelrule iscolor-mix(..., 60%). Class remaps only.
Changed
:phoenix_kitfloor raised~> 2.0→~> 2.6(two-segment, so later 2.x still resolve). The previous floor admitted cores withoutput_slug/3and without V171.
E-commerce 0.2.2. Install or update: {:phoenix_kit_ecommerce, "~> 0.2"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.