HOG-522: Exclude Image Guide from JS concatenation on Atomic/WoW#47918
Draft
LiamSarsfield wants to merge 2 commits intotrunkfrom
Draft
HOG-522: Exclude Image Guide from JS concatenation on Atomic/WoW#47918LiamSarsfield wants to merge 2 commits intotrunkfrom
LiamSarsfield wants to merge 2 commits intotrunkfrom
Conversation
…oW sites The jetpack-boost-guide script is a webpack IIFE bundle that uses wp_localize_script for inline data. When the Atomic/WoW platform's JS concatenation combines it with other scripts, the resulting bundle is malformed, producing "Uncaught SyntaxError: Unexpected end of input" and causing the Image Guide feature to silently disappear. Boost's own concatenation logic already skips scripts with inline content, but the platform-level concatenation on Atomic/WoW does not. Adding the handle to the existing js_do_concat exclusion list prevents the platform from concatenating this script. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 1 file.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves https://linear.app/a8c/issue/HOG-522/jetpack-boost-image-guide-disappears-with-concatenate-js-enabled-on
Proposed changes
jetpack-boost-guidefrom platform-level JS concatenation on Atomic/WoW sites by adding it to thejs_do_concatexclusion list incompatibility/js-concatenate.php.Other information
The Image Guide script (
guide.js) is a webpack IIFE bundle that also useswp_localize_scriptto inject inline data. Boost's own concatenation logic already skips scripts with inline content viahas_inline_content(), but the Atomic/WoW platform's JS concatenation does not have this safeguard. When the platform concatenates this script with others, the resulting bundle is malformed, producing "Uncaught SyntaxError: Unexpected end of input" and causing the Image Guide to silently disappear.This follows the existing pattern used for other problematic scripts (WooCommerce, Event Tickets, etc.) in the same file.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
page_optimizeoption)Uncaught SyntaxError: Unexpected end of inputerrorsVerification
jp test php plugins/boost)Confidence
HIGH — This is a straightforward exclusion-list addition following an established pattern. The root cause is well-understood: webpack IIFE bundles with inline script data are not safe to concatenate at the platform level.
🤖 This PR was created autonomously by the Boost Linear Solver.
Triage complexity: medium | Linear issue