area17 / twill

Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/cnWk7EFv8R.
https://twillcms.com
Apache License 2.0
3.72k stars 568 forks source link

afterSaveHandleTags not setting slug generator for $fields["bulk_tags"] when containing chinese characters in tags #2505

Open hubo502 opened 6 months ago

hubo502 commented 6 months ago

Description

tag when bulk update medias tags with A17\Twill\Http\Controllers\Admin\MediaLibraryController->bulkUpdate, afterSaveHandleTags in HandleTags trait not checking if $fields['bulk_tags'] contains Chinese characters, so it does not setting slug generator properly.

Expected result

if $fields['bulk_tags'] contains Chinese characters,$object should setSlugGenerator like handing $fields['tags'].

Actual result

tag2 table twill_tags creates duplicate tag(same name but empty in slug column)

Versions

Twill:3.1.0