AdvancedCustomFields / AdvancedCustomFields/acf
Required fields in Gutenberg blocks
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Currently, there seems to be no way to get fields in Gutenberg blocks act as required.
In my limited testing, under ACF 5.8 Beta 2 posts were saved regardless of any "required" setting.
Under Beta 3, setting a post relationship field to required seems to be able to do bad things – I've just had 3 posts go to an uneditable state with instant
Fatal error: Uncaught Error: Maximum function nesting level of '256' reached, aborting! in /Users/philby/Sites/mysite/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-helpers.php on line 144
(not 100% sure this is related to the required setting yet, but not turning it on seems to make things much more stable).
Contributor guide
No contributing guide indexed for this repository
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 by reproducing the required-field behavior in Gutenberg blocks under the ACF 5.8 beta versions described. Inspect includes/api/api-helpers.php around line 144 when the post relationship field is required, and compare saving with that setting enabled and disabled. Done means identifying whether the required setting causes the fatal nesting error and restoring editable posts with correct required-field handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100