Repository navigation
Conversation
…nt pages Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
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.
What was wrong
The header and footer fragments synced from the static site replace the theme's template parts and load their CSS and JavaScript (as a module) on every front-end page. That included the checkout, the order received page, My Account with its login and registration forms, and the lost password page, so any script published on the static site ran next to passwords, billing data and tax IDs, and with the session of an administrator browsing the store.
What changed
On the checkout, the order received page, My Account (which also covers login, registration and the lost password endpoint) and the direct
/lost-password/route, the fragment CSS and JS are no longer enqueued and theheader/footertemplate parts keep the theme's own markup. Other pages (shop, product, cart and so on) keep using the synced fragments as before.On a site whose front page is My Account, the home page is covered by the same rule.
Verification
mainand passes with the change; the existing test for the other pages still passes.composer cigreen locally on PHP 8.3: lint, PHPCS, PHPStan, 140 unit and 171 integration tests (also with--order-by=random)./my-account/and/lost-password/no longer reference the fragment scripts, while the cart still does.