Skip to content

Fix editor reload loop on products with combinations - #378

Merged
PercolatingStudio merged 1 commit into
mainfrom
codex/issue-357-product-combination-url
Nov 7, 2026
Merged

PercolatingStudio merged 1 commit into
mainfrom
codex/issue-357-product-combination-url

Conversation

@PercolatingStudio

Copy link
Copy Markdown
Owner

Fixes #357.

Reproduction

On the published 3.2.4 ZIP (same source as base fdcf3c1), open PrettyBlocks with a local demo product's combination URL as startup_url, including a query and the #/1-taille-s/8-couleur-blanc fragment. On PrestaShop 9.1.4, the iframe requests ?qa=variant?prettyblocks=1 rather than a separate edit flag. The back office then repeatedly reloads with more copies of ?prettyblocks=1 in startup_url.

Fix

  • Resolve and normalize the preview URL once, putting exactly one prettyblocks=1 in the query and retaining the original combination fragment and other query values.
  • Use that URL for both the iframe and the back-office startup URL. Do not force another reload for an unchanged normalized URL.
  • Resolve relative links against the current preview, preserve the shop-directory convention from Navigation with relative url #261, and normalize an already-corrupted edit flag on reopening.

Thanks to @inodia-agency for the detailed reproduction.

Validation

  • Eight regression tests fail against the previous URL logic and pass with the fix; all 40 Node tests pass. The release builder runs the new URL tests.
  • Built the exact candidate ZIP and installed it on clean PrestaShop 8.2.7/PHP 8.1.33 and 9.1.4/PHP 8.5.0 shops. Package structure, Vite manifest/assets, and existing smoke tests passed. Local candidate SHA-256: 7a9650cba56aff68992d88c4f9fa9e2d6da7237520062eca00a718f475b9ab09.
  • In Chrome on both shops: open the product preview with an existing query and combination fragment, verify product/footer zones and one edit flag, switch size S → M, reload the back office, and confirm the same selected combination and zones. No reload loop or uncaught browser errors. An old duplicated edit flag was also repaired in both the preview and the back-office address on PS9.1.4.
  • The reporter's PS9.2.0 setup was not tested; subdirectory/relative URL cases are covered by the URL tests.

No version bump, tag, release, or database change.

@PercolatingStudio
PercolatingStudio merged commit 3e4a265 into main Nov 7, 2026
3 checks passed
@PercolatingStudio
PercolatingStudio deleted the codex/issue-357-product-combination-url branch November 7, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite reload loop / no zones detected on product pages with combinations

1 participant