Voyager: Problem with BREAD form when multilingual is enabled

Created on 26 Mar 2018  路  6Comments  路  Source: the-control-group/voyager

  • Laravel Version: 5.5.39
  • Voyager Version: 1.0.16
  • PHP Version: 7.2.3
  • Database Driver & Version: MySql 5.7.21
  • Browser: Google Chrome

Steps To Reproduce:

  1. Make my own model of Page
  2. Delete "title" from $translatable array
  3. In edit Page in database check "Not null" for title
  4. Enable multilingual
  5. Go to adding page.
  6. Fill everything in all languages.
  7. Button "Save" doesn't do anything, but in console I see error An invalid form control with name='body' is not focusable
duplicate

All 6 comments

Take a look at those 2 issues: https://github.com/the-control-group/voyager/issues/2578 and https://github.com/the-control-group/voyager/issues/2288
Its either fixed in 1.0.16 (republish assets with --force flag) and/or was a bug in Chrome

@emptynick Thanks for help :+1:

You got it working?

Laravel Version: 5.5.40
Voyager Version: 1.0.17
PHP Version: 7.2.3
Database Driver & Version: MySql 5.7.20
Browser: Google Chrome 65, Safari 11.1

When I setup multilingual I get the same error described.

I republished the assets with --force and it is still showing the An invalid form control with name='body' is not focusable error, what else can be done?

You can't use required validation with Voyager multilingual functionality currently. When you do so, Laravel adds browser-native validation attributes, which makes the browser try to focus the field when its contents are invalid. Multilingual functionality adds hidden duplicate-named fields on the page for each language. Since the fields are hidden, you can't set a value, and the browser can't focus it, it shows the above error. This is a known issue that requires a complete rewrite of how we do i18n, so it likely won't be fixed anytime too soon.

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kevinjon27 picture kevinjon27  路  3Comments

TPRAsh picture TPRAsh  路  3Comments

MikadoInfo picture MikadoInfo  路  3Comments

craigb88 picture craigb88  路  3Comments

popica80 picture popica80  路  3Comments