fix issue with GDPR module in concurrent auctions #2612
Merged
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.
Type of change
Description of change
To address issue reported in #2586
The current consentManagement module interferes with requests in concurrent auctions (ie multiple requestBids on a page) from firing off/finishing as expected. This is due to the global variables being overwritten and the context of the previous auction instances being lost.
This change stores the variables needed for the consentManagement module in an config object that gets passed along through the workflow of the module to remove the need for global variables. This preserves the needed context for the multiple auctions to complete as expected.
To easily replicate the issue:
euconsent
cookie (in case you had consent previously)Both ads on the page should render successfully (with consent information included in both). Previously only one of ads would render and nothing would be shown for the other.