Search bar in Knowledge Base not working after Consent Mode V2

Basically, my client has a Knowledge Base sub page FoodDocs Knowledge Base

I recently implemented a cookie banner with Consent Mode V2. Basically, it’s just a dialogue box that asks if user accepts cookies or not. If user doesn’t consent or clicks “Deny” then cookies will be disabled by default.

Now the problem is that when user doesn’t consent, then Knowledge Base’s search bar stops working completely.

What steps can I take to fix this problem?

Any help is appreciated, because I am really stumped on this issue.

@MKottise there’s a reference error on the page that’s blocking the search:

I would check your CookieBot settings or reach out to their support for further guidance.

Thanks for the tip!

I think this error might be caused by some script being blocked, might be “kb-search.min.js”. To make sure, I’d like to add the attribute:

data-cookieconsent=“ignore”

To this:
<link href=“https://cdn2.hubspot.net/hub/7052064/hub_generated/template_assets/1709587114088/hubspot/themes/knowledge/assets/kb-search.min.js” rel=“preload” as=“script”>

Do you have any thoughts how I could achieve it? If it is not possible to directly edit this, is there a js file in Design Manager where I could write javascript that could interact with Knowledge Base page?

Hi @MKottise unfortunately the Knowledge Base templates and code are not accessible and can’t be modified or appended.

I’ve seen similar issues with themes and cookie bots - essentially if the user denies all cookies, it prevents necessary JS from loading.

It might be worth reviewing the cookie bot notification to include a warning that search functionality is limited if X cookie is not accepted.

I see. Might consider adding a warning to the cookie message. Thank you for the assistance!

you’re welcome, happy to help!