Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Nova Dependency Container #123

Open
dividy opened this issue Dec 17, 2019 · 9 comments
Open

Compatibility with Nova Dependency Container #123

dividy opened this issue Dec 17, 2019 · 9 comments

Comments

@dividy
Copy link

dividy commented Dec 17, 2019

Hello,

Anybody else having issues with Nova Dependency Container inside Flexible Content ?
I'm using a custom Preset & Resolver. Data is saved correctly in the DB.

If I add 2 products to my "product" layout, the 1st product's fields have the last product's values. (eg. in DB: sale_price: 3/sale_price:1 gives sale_price:1/sale_price:1 in the edit form...)

Any idea ?

@toonvandenbos
Copy link
Member

Hi @dividy,

Is your issue similar to #129 ?

@toonvandenbos toonvandenbos added the duplicate This issue or pull request already exists label Jan 14, 2020
@deckchan
Copy link

No, this is not similar to 129.

Confirm this is still happening in:

  • laravel/nova v3.6.0
  • epartment/nova-dependency-container 1.2.11
  • whitecube/nova-flexible-content v0.2.5

I checked this should be a data displaying issue.

In Update Form

all flexible elements' values are replaced by the last flexible element value if using NovaDependencyContainer

@phrasetagg
Copy link

Hello!
Is it possible to solve this problem? And i can't fiind an issue wich is duplicated by this one @Nyratas

@toonvandenbos toonvandenbos removed the duplicate This issue or pull request already exists label Apr 26, 2021
@toonvandenbos
Copy link
Member

Hi @phrasetagg, thanks for the feedback. I'm hoping to find some time for these urgent issues soon.

@Blindmikey
Copy link

This seems to be due to duplicate field IDs - caused by the flexible "key" not being appended to the field ID for all fields in a NovaDependencyContainer that's housed in a Flexible.

@Blindmikey
Copy link

Trying to narrow down the issue, it looks like renameFields() isn't being fired for fields inside of NovaDependencyContainer fields.

@Blindmikey
Copy link

Solved my issue by using a custom class extending layout and using duplicateAndHydrate()

@MorningAM
Copy link

Solved my issue by using a custom class extending layout and using duplicateAndHydrate()

Can you please share your solution?

@daanadriaan
Copy link

There's a workaround mentioned in this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants