Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

PBS Bid Adapter: remove site object when app is present

Open bretg opened this issue 4 years ago • 3 comments

Type of issue

enhancement

Description

Prebid Server chokes when an OpenRTB request contains both site and app sections. Since OpenRTB says this is an invalid scenario, that committee has determined in https://github.com/prebid/prebid-server/issues/1947 that the right solution is to prevent it from happening.

Steps to reproduce

The instructions at https://docs.prebid.org/faq/prebid-server-faq.html#how-can-i-use-prebid-server-in-a-mobile-app-post-bid-scenario define how to use PBJS for App in a Post-Bid scenario.

But it doesn't actually work because the PBS Bid Adapter also includes site.

So we need to update the PBS Bid adapter to:

  • First do all the merging: getConfig({app}), getConfig({site}), getConfig({ortb2})
  • Then check the result. If both app and site are present, then remove site with a console warning
  • it's up to the page to make sure any common fields (e.g. cat) are in the app object

Note: we don't consider this a breaking change because PBS is already failing on this if it's happening. We're just moving the validation to the client side to save everyone the headache.

bretg avatar Aug 20 '21 12:08 bretg

https://github.com/prebid/Prebid.js/blob/master/modules/prebidServerBidAdapter/index.js#L330 Is it already handled?

pm-harshad-mane avatar Sep 22 '21 18:09 pm-harshad-mane

might make sense for the validations module to also note this issue

patmmccann avatar Sep 28 '21 17:09 patmmccann

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 08 '22 23:01 stale[bot]

fix in #9258

patmmccann avatar Jan 25 '23 18:01 patmmccann