Square Champion

Why will my cookie script not work?

A friend who knows their way around coding just wrote me a cookie script and square is saying The formatting is incorrect. Try clearing the code, then copy and paste again. what format does a cookie script need to be written in?

Matt - He/They
Sign in and click Mark as Best Answer if my reply answers your question!
mjdws
Shop MJD Photography
Visit MJD Web Services
Tags (1)
4,732 Views
Message 1 of 12
Report
11 REPLIES 11
Admin

Hi @MJD, thanks for flagging this! Would you mind sharing the script with me -- that way, I can check in with our team to troubleshoot why the error is occurring. 

Tra | she/her
Community Program Manager, Square
4,695 Views
Message 2 of 12
Report
Square Champion

<link rel="stylesheet" type="text/css" href="https://cdn.wpcc.io/lib/1.0.2/cookieconsent.min.css"/><script src="https://cdn.wpcc.io/lib/1.0.2/cookieconsent.min.js" defer></script><script>window.addEventListener("load", function(){window.wpcc.init({"colors":{"popup":{"background":"#606060","text":"#ffffff","border":"#f9f9f9"},"button":{"background":"#f9f9f9","text":"#000000"}},"position":"bottom","padding":"small","margin":"large","transparency":"20","content":{"href":"https://www.websitepolicies.com/policies/view/QUEfYoL9"}})});</script>

This is the script @tranguyen 

Matt - He/They
Sign in and click Mark as Best Answer if my reply answers your question!
mjdws
Shop MJD Photography
Visit MJD Web Services
4,694 Views
Message 3 of 12
Report
Admin

Thanks for this @MJD! I'm just checking with the team now and will follow up when I have an update from them. 

Tra | she/her
Community Program Manager, Square
4,687 Views
Message 4 of 12
Report
Square Champion

Ok thank you 

Matt - He/They
Sign in and click Mark as Best Answer if my reply answers your question!
mjdws
Shop MJD Photography
Visit MJD Web Services
4,686 Views
Message 5 of 12
Report
Admin

Hey @MJD, the team has looked into this and they believe the first line <link rel="stylesheet" type="text/css" href="https://cdn.wpcc.io/lib/1.0.2/cookieconsent.min.css"/> is what's causing the error message.

 

If you try to enter the code without this line, do you still get an error message?

Tra | she/her
Community Program Manager, Square
4,680 Views
Message 6 of 12
Report
Square Champion

The error message has made a sudden disappearance 🙂 however the button in the code is no longer working so I have a team of web developers I know taking a look into it to write a more effective code. thank you for your help though!

Matt - He/They
Sign in and click Mark as Best Answer if my reply answers your question!
mjdws
Shop MJD Photography
Visit MJD Web Services
4,679 Views
Message 7 of 12
Report
Square Champion

I've just taken a second look and did someone your end already take out the top line? it no longer seems to be there but neither does the cookie banner?

Matt - He/They
Sign in and click Mark as Best Answer if my reply answers your question!
mjdws
Shop MJD Photography
Visit MJD Web Services
4,676 Views
Message 8 of 12
Report
Admin

Hey @MJD, I've checked with our team and we haven't made any changes to this. 

Tra | she/her
Community Program Manager, Square
4,662 Views
Message 9 of 12
Report
Square Champion

very confusing then... I'm having the cookie banner remade anyway... is there any news on why the default cookie banner is not removed when a custom one is added yet?

Matt - He/They
Sign in and click Mark as Best Answer if my reply answers your question!
mjdws
Shop MJD Photography
Visit MJD Web Services
4,661 Views
Message 10 of 12
Report
Admin

The team have let me know they should have a fix by next week. I'll definitely follow-up once I'm able to confirm the issue is fully resolved!

Tra | she/her
Community Program Manager, Square
4,583 Views
Message 11 of 12
Report
Square Champion

Thank you!

Matt - He/They
Sign in and click Mark as Best Answer if my reply answers your question!
mjdws
Shop MJD Photography
Visit MJD Web Services
4,582 Views
Message 12 of 12
Report