Open
Conversation
|
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.
Fixes shopware#13387
1. Why is this change necessary?
Google Analytics does not work in Shopware storefront because the
SalesChannelAnalyticsLoaderservice is never instantiated. This service is responsible for injecting Google Analytics configuration data into storefront templates during theStorefrontRenderEvent. Without this service, thestorefrontAnalyticstemplate variable remains undefined, preventing Google Analytics from loading.2. What does this change do, exactly?
File:
src/Storefront/Storefront.phpChange: Adds the missing
$loader->load('system.xml')call in thebuild()method.This loads the
src/Storefront/DependencyInjection/system.xmlfile which contains the service definition forSalesChannelAnalyticsLoader:3. Describe each step to reproduce the issue or behaviour.
storefrontAnalyticstemplate variable is undefined4. Please link to the relevant issues (if any).
5. Checklist
I have written tests and verified that they fail without my change
I have updated developer-facing release notes if this change affects external developers:
RELEASE_INFO-6.<major>.mdunder "Upcoming" for informational changes.UPGRADEsection inUPGRADE-6.<next-major>.mdfor breaking changes (what/why/impact/how to adapt).I have written or adjusted the documentation according to my changes
This change has comments for package types, values, functions, and non-obvious lines of code
I have read the contribution requirements and fulfilled them
Note: This is a minimal, surgical fix that restores Google Analytics functionality without affecting any other Shopware features. The change is backward compatible and follows Shopware's existing patterns.