AdvancedCustomFields / AdvancedCustomFields/acf

[Pro][Bug] race condition in block preview and gallery field sorting

Open
#641 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Create a block with a gallery field.
  2. Use Chrome to throttle your connection to "slow 3g".
  3. Add images to the gallery.
  4. Change sorting from the gallery drop down.
  5. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.