nova-flexible-content
nova-flexible-content copied to clipboard
Compatibility with Nova Dependency Container
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 ?
Hi @dividy,
Is your issue similar to #129 ?
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
Hello! Is it possible to solve this problem? And i can't fiind an issue wich is duplicated by this one @Nyratas
Hi @phrasetagg, thanks for the feedback. I'm hoping to find some time for these urgent issues soon.
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.
Trying to narrow down the issue, it looks like renameFields() isn't being fired for fields inside of NovaDependencyContainer fields.
Solved my issue by using a custom class extending layout and using duplicateAndHydrate()
Solved my issue by using a custom class extending layout and using duplicateAndHydrate()
Can you please share your solution?
There's a workaround mentioned in this issue