You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did everything what is in the documentation properly. Everything seems to be OK. Records with the existing translations are updated correctly, but the new records (SQL commands) are without field :locale and cause the error message: - Translations locale can't be blank
Here is the output (server log):
Started POST "/r_admin_321/event/new" for 127.0.0.1 at 2020-06-26 00:31:36 +0200
Processing by RailsAdmin::MainController#new as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"9PdkLD7qAHFUjXtkNHPVSOdcLT0gdSNfNXveFhmvqEkUA2CzbtY81zqMG4Gesvv/CdRNjsvhPVNOqb9QxfEAVw==", "event"=>{"link"=>"", "active"=>"0", "event_photo_ids"=>["", ""], "translations_attributes"=>{"0"=>{"name"=>"aaa", "perex"=>"", "description"=>""}, "1"=>{"name"=>"bbb", "perex"=>"", "description"=>""}}}, "_wysihtml5_mode"=>"1", "return_to"=>"http://fi.qq:3000/r_admin_321/event", "_save"=>"", "model_name"=>"event"}
EventPhoto Load (0.9ms) SELECT "event_photos"."id", "event_photos"."image", "event_photos"."position", "event_photos"."event_id", "event_photos"."created_at", "event_photos"."updated_at" FROM "event_photos" WHERE 1=0 ORDER BY "event_photos"."position" ASC
↳ /home/modreoci/.rvm/gems/ruby-2.6.5@skphccc2/gems/activerecord-5.2.4.2/lib/active_record/log_subscriber.rb:98
(0.2ms) BEGIN
↳ /home/modreoci/.rvm/gems/ruby-2.6.5@skphccc2/gems/activerecord-5.2.4.2/lib/active_record/log_subscriber.rb:98
(0.2ms) ROLLBACK
Hereconfig/initialiters/rails_admin.rb
RailsAdmin.configdo |config|
config.included_models=['Carousel','Carousel::Translation','Document','Document::Translation','Event','Event::Translation','EventPhoto','EventPhoto::Translation','Member','Member::Translation','Personality','Personality::Translation','Spotlight','Spotlight::Translation']config.actionsdodashboard# mandatoryindex# mandatorynewexportbulk_deleteshoweditdeleteshow_in_app## With an audit adapter, you can add:# history_index# history_shownestableendconfig.modelCarouseldonestable_listtrueconfigure:translations,:globalize_tabsexclude_fields:id,:position,:created_at,:updated_atendconfig.model'Carousel::Translation'dovisiblefalseconfigure:locale,:hiddendohelp''endinclude_fields:locale,:titleendconfig.modelDocumentdonestable_listtrueconfigure:translations,:globalize_tabsexclude_fields:id,:position,:created_at,:updated_atendconfig.model'Document::Translation'dovisiblefalseconfigure:locale,:hiddendohelp''endeditdofield:namefield:description,:wysihtml5endinclude_fields:locale,:name,:description,:slugendconfig.modelEventdonestable_listtrueconfigure:translations,:globalize_tabsexclude_fields:id,:position,:created_at,:updated_atendconfig.model'Event::Translation'dovisiblefalseconfigure:localedohelp''endeditdofield:namefield:perexfield:description,:wysihtml5endinclude_fields:locale,:name,:perex,:description,:slugendconfig.modelEventPhotodonestable_listtrueconfigure:translations,:globalize_tabsexclude_fields:id,:position,:created_at,:updated_atendconfig.model'EventPhoto::Translation'dovisiblefalseconfigure:locale,:hiddendohelp''endeditdofield:namefield:description,:wysihtml5endinclude_fields:locale,:name,:descriptionendconfig.modelMemberdonestable_listtrueconfigure:translations,:globalize_tabsexclude_fields:id,:position,:slug,:created_at,:updated_atendconfig.model'Member::Translation'dovisiblefalseconfigure:locale,:hiddendohelp''endeditdofield:description,:wysihtml5endinclude_fields:locale,:descriptionendconfig.modelPersonalitydonestable_listtrueconfigure:translations,:globalize_tabsexclude_fields:id,:position,:slug,:created_at,:updated_atendconfig.model'Personality::Translation'dovisiblefalseconfigure:locale,:hiddendohelp''endeditdofield:job_titlefield:rolefield:description,:wysihtml5endinclude_fields:locale,:job_title,:role,:descriptionend
`
config.modelSpotlightdonestable_listtrueconfigure:translations,:globalize_tabsexclude_fields:id,:position,:slug,:created_at,:updated_atendconfig.model'Spotlight::Translation'dovisiblefalseconfigure:locale,:hiddendohelp''endeditdofield:body,:wysihtml5endinclude_fields:locale,:bodyendend
I did everything what is in the documentation properly. Everything seems to be OK. Records with the existing translations are updated correctly, but the new records (SQL commands) are without field
:locale
and cause the error message:- Translations locale can't be blank
Here is the output (server log):
Here
config/initialiters/rails_admin.rb
Here
app/models/event.rb
And finally the screenshot (both translations fields Name was correctly filled out):
The text was updated successfully, but these errors were encountered: