Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing some recent bugs in addBidResponse #1372

Merged
merged 3 commits into from
Jul 13, 2017
Merged

Conversation

dbemiller
Copy link
Contributor

@dbemiller dbemiller commented Jul 12, 2017

Type of change

Bugfix

Description of change

Fixing some regressions introduced in #1277

  1. The old code allowed adapters to call addBidResponse without supplying a bid. This permissibility may or may not be a good idea... but Implementing prebid-cache to support Video ads #1277 definitely isn't a good place to make that change. The (!bid) check is added back in here.

  2. The bidAdustment event needs to be fired before the getPriceBucketStrings gets called, because listeners for that event may mutate the bid's cpm.

@dbemiller dbemiller mentioned this pull request Jul 12, 2017
8 tasks
matthewlane
matthewlane previously approved these changes Jul 12, 2017
@dbemiller dbemiller changed the title Add no bid check Fixing some recent bugs in addBidResponse Jul 13, 2017
@@ -108,11 +108,11 @@ exports.addBidResponse = function (adUnitCode, bid) {
}

if (!adUnitCode) {
utils.logWarn(errorMessage('No adUnitCode was supplied to addBidResponse.'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw if you put the bid check before the adUnitCode, you could still use errorMessage here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, these checks really shouldn't be necessary anyway once we have a proper adapter validator in place.

@mkendall07 mkendall07 merged commit 9de31b3 into master Jul 13, 2017
@mkendall07 mkendall07 deleted the add-no-bid-check branch July 13, 2017 14:21
jbAdyoulike pushed a commit to jbAdyoulike/Prebid.js that referenced this pull request Sep 21, 2017
* Added back the guard against undefined bids... for now.

* Added back the guard to allow undefined bids, because we have no idea which adapters are doing this.

* Made sure that the bid adjustment event fired before we use any of the bid properties.
dluxemburg pushed a commit to Genius/Prebid.js that referenced this pull request Jul 17, 2018
* Added back the guard against undefined bids... for now.

* Added back the guard to allow undefined bids, because we have no idea which adapters are doing this.

* Made sure that the bid adjustment event fired before we use any of the bid properties.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants