OFFLINE-GmbH / oc-gdpr-plugin

October CMS plugin to make websites GDPR and ePrivacy compliant
https://octobercms.com/plugin/offline-gdpr
MIT License
36 stars 20 forks source link

Unable to use Klaro #58

Closed fmulassano closed 5 years ago

fmulassano commented 5 years ago

Following the guide i have installed and configured the GDPR plugin. i see the consent bar but the klaro manager doesn't appear... in javascript console i have this error Uncaught SyntaxError: Unexpected end of input (index) : 467

klaro_error

tobias-kuendig commented 5 years ago

Could you post the whole klaroConfig variable from your website's source code? Would it be possible that you have a syntax error in the translations json you've entered in the backend?

faselunare commented 5 years ago

yes, this is the code

<script>
--
  | var klaroConfig = {
  | elementID: 'oc-gdpr-klaro',
  | cookieName: 'oc-gdpr-klaro',
  | cookieExpiresAfterDays: 30,
  | privacyPolicy: '/privacy',
  | default: false,
  | mustConsent: false,
  | lang: 'en',
  | translations: {
  | it: {
  | consentModal: {
  | description:
  | 'Here you can see and customize the information that we collect about you. Entries marked as "Example" are just for demonstration purposes and are not really used on this website.',
  | },
  | inlineTracker: {
  | description: 'Example of an inline tracking script',
  | },
  | externalTracker: {
  | description: 'Example of an external tracking script',
  | },
  | adsense: {
  | description: 'Displaying of advertisements (just an example)',
  | },
  | matomo: {
  | description: 'Collecting of visitor statistics',
  | },
  | camera: {
  | description:
  | 'A surveillance camera (just a silly example for an IMG tag)',
  | },
  | cloudflare: {
  | description: 'Protection against DDoS attacks',
  | },
  | intercom: {
  | description:
  | 'Chat widget & collecting of visitor statistics (just an example)',
  | },
  | mouseflow: {
  | description: 'Real-Time user analytics (just an example)',
  | },
  | googleFonts: {
  | description: 'Web fonts hosted by Google',
  | },
  | purposes: {
  | analytics: 'Analytics',
  | security: 'Security',
  | livechat: 'Livechat',
  | advertising: 'Advertising',
  | styling: 'Styling',
  | }
  | },
  | apps: [
  | ]}</script>
tobias-kuendig commented 5 years ago

Please check the translations object you have entered in the backend. You are missing a closing } in there (probably on the purposes key)

faselunare commented 5 years ago

Thanks, it works now