Voyager: Add/Edit value doesn't update on Relationship Belongs To

Created on 17 Jan 2018  路  11Comments  路  Source: the-control-group/voyager

  • Laravel Version: 5.5
  • Voyager Version: 1.0.14
  • PHP Version: 7.0
  • Database Driver & Version: NA

Description:

When you create a realationship "belong to" and try to edit the record the realation field doesn't update.

Steps To Reproduce:

  1. Create a realationship belong to
  2. Add or Edit a record
  3. Change the relation value (on select2)
  4. Save
  5. The value doesn't update
bug help wanted

Most helpful comment

Hi,

I had the same issue today, this worked for me:
You must leave the base field active and select input "Select Dropdown"

Bad :

image

Great:

image

Hope this help

All 11 comments

Hi, temporary fix:
https://voyager.readme.io/v0.11/docs/relationships, You must use new and old way of definig relations.

Hi,

I had the same issue today, this worked for me:
You must leave the base field active and select input "Select Dropdown"

Bad :

image

Great:

image

Hope this help

@nquillet thank you.

@nquillet 's solution is fine. It works also for us. Please fix it in next release (or update your documentation)

The default selected type is now text, so this isn't a problem anymore.
Ref https://github.com/the-control-group/voyager/pull/2837 (1.x-dev)

Hello @emptynick,

Unfortunately, this is still happening for me.

Laravel version 5.6
Voyager Version ^1.1
PHP version 7.2 on Laravel Homestead

I have tried adding the base relationship field as Text as Select Dropdown and even as number and it is not updating correctly

Never mind, I just noticed the base field must be "checked" for read and edit views

That is absolutely correct.

aww @nquillet this is awesome!

@nquillet, this approach worked! Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wislem picture wislem  路  3Comments

rayqiri picture rayqiri  路  3Comments

kevinjon27 picture kevinjon27  路  3Comments

raoasifraza1 picture raoasifraza1  路  3Comments

ferrywae picture ferrywae  路  4Comments