x
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)
2,924 Views
Message 1 of 12
Report Inappropriate Content
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 Engagement Program Manager, Square
Have a burning question to ask in our Question of the Week? Share it with us!
2,888 Views
Message 2 of 12
Report Inappropriate Content
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
2,887 Views
Message 3 of 12
Report Inappropriate Content
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 Engagement Program Manager, Square
Have a burning question to ask in our Question of the Week? Share it with us!
2,880 Views
Message 4 of 12
Report Inappropriate Content
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
2,879 Views
Message 5 of 12
Report Inappropriate Content
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 Engagement Program Manager, Square
Have a burning question to ask in our Question of the Week? Share it with us!
2,873 Views
Message 6 of 12
Report Inappropriate Content
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
2,872 Views
Message 7 of 12
Report Inappropriate Content
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
2,869 Views
Message 8 of 12
Report Inappropriate Content
Admin

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

Tra | she/her
Community Engagement Program Manager, Square
Have a burning question to ask in our Question of the Week? Share it with us!
2,855 Views
Message 9 of 12
Report Inappropriate Content
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
2,854 Views
Message 10 of 12
Report Inappropriate Content
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 Engagement Program Manager, Square
Have a burning question to ask in our Question of the Week? Share it with us!
2,776 Views
Message 11 of 12
Report Inappropriate Content
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
2,775 Views
Message 12 of 12
Report Inappropriate Content