wintercms / wintercms/wn-test-plugin
User pivot jsonable fields not editables
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 15
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
On the User controller, awards can be added to pivot data with
1 - "Pivot model" tab :
Adding pivot data (awards) work's well, the data are present in DB; but when editing them the repeater field is not filed.
2 - "Pivot data" tab :
Throw an error "Unexpected type of array when attempting to save attribute "awards", try adding it to the $jsonable property." on line 824 of ...\vendor\winter\storm\src\Database\Model.php.
Additional question:
Is it possible to edit role data and pivot model data in the same pop-up?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the User controller and the pivot model/data tabs described in the issue, then inspect vendor/winter/storm/src/Database/Model.php around line 824. Reproduce the empty repeater and the awards save error, and confirm that pivot awards can be loaded and edited without the jsonable exception; the shared-popup question remains an additional design question.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100