autoform directives.order not working anymore
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 109
- Forks
- 107
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 4
Description
I've found that changes made here have a side effect: custom fields sorting are not working retrieving types schema.
How to reproduce:
- create a content with schema interface
- move a field before another one from a behavior (directives.order_after(my_field="ILeadImageBehavior.image_caption"))
If you call @types/MyType restapi endpoint, image_caption is after my_field.
If you go in edit from Plone classic interface, image_caption is before my_field.
Removing ignorePrefix=True seems fixing this issue but reverts the old one.
@avoinea any ideas?
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
Review the files changed in pull request 1074 and reproduce the ordering difference through the @types/MyType REST API endpoint, comparing it with Plone's classic edit interface. Trace how directives.order_after and ignorePrefix=True affect behavior-provided fields. Done means custom field ordering matches the classic interface without reintroducing the issue addressed by pull request 1074.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100