Closed VelziDM closed 1 year ago
@VelziDM
Thank you very much for finding the problem! Problem solved, please update the package to the new version (2.1.1)
Thanks a lot
@VelziDM
Thank you very much for finding the problem! Problem solved, please update the package to the new version (2.1.1)
Thanks for the updates!
Unfortunately I get error after update when I type title:
in_array(): Argument #2 ($haystack) must be of type array, null given {"userId":2,"exception":"[object] (TypeError(code: 0): in_array(): Argument #2 ($haystack) must be of type array, null given at vendor/kongulov/nova-tab-translatable/src/Http/Controllers/FieldPreviewController.php:32)
Nova version: 4.22.0
@rafaelsmith
please send me NovaTabTranslatable::make([....]) so I can recreate the problem myself too. Is the problem only when updating the resource? Or and at creation too?
@rafaelsmith
please send me NovaTabTranslatable::make([....]) so I can recreate the problem myself too. Is the problem only when updating the resource? Or and at creation too?
It's only on create
NovaTabTranslatable::make([
Text::make('Title')->rules('required'),
Slug::make('Slug')->from('Title')->separator('_')->hideFromIndex(),
Textarea::make('Excerpt')
->rules('required')
->rows(2),
Tiptap::make('Content')
->buttons(['heading','|','italic','bold','|','link','code','strike','underline','highlight','|','bulletList','orderedList','br','codeBlock','blockquote','|','horizontalRule','hardBreak','|','table','|','image','|','textAlign','|','rtl','|','history','|','editHtml'])
->headingLevels([2, 3, 4])
->imageSettings([
'disk' => 's3',
'path' => '/posts',
])
->rules('required'),
]),
@rafaelsmith
You have a problem elsewhere.
In the model, you must specify both keys as translatable
public $translatable = ['title', 'slug'];
My bad... It was protected
not public
.
Thanks for the update :)
Good afternoon. Thank you for the great package. But I have some issues, hope you can help. There is a 404 on preview for slug when you change the main field. This happens both when creating and updating. I think it's because the field name is changed from
slug
totranslations_slug_en
.kongulov/nova-tab-translatable: 2.1.0 New version: 4.21.0 Laravel Framework 9.50.2 Php version: 8.1
Thank you.