AdvancedCustomFields / AdvancedCustomFields/acf
[Pro][Bug] race condition in block preview and gallery field sorting
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Version tested: 5.12.2
Bug: On slow connections/servers the block preview refreshes before the ajax request is returned by the gallery field that contains the updated sorting order. This causes the block to appear out of sync with the gallery field.
Steps to reproduce:
- Create a block with a gallery field.
- Use Chrome to throttle your connection to "slow 3g".
- Add images to the gallery.
- Change sorting from the gallery drop down.
- The block preview will not reflect the current state of the gallery field unless you force a refresh by triggering another field or the autosave event fires off.
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
Reproduce the issue by throttling Chrome to slow 3G, then changing the gallery sorting while observing the block preview and gallery-field AJAX request. Trace the gallery field's sorting update and the block preview refresh; done when the preview reflects the updated gallery order without requiring another field change or autosave.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100