klaro-js
klaro-js copied to clipboard
Uncaught ReferenceError: klaro is not defined
Hello,
I downloaded klaro-no-translations-no-css.js in the current version 0.7.22 from the CDN and installed it locally. Initially the content banner was loaded with my config, but it could not be called later with klaro.show();. I always received the error message
Uncaught ReferenceError: klaro is not defined
After some searching I realized that in klaro-no-translations-no-css.js since v0.7.20 the object is exported with the name 'klaro-no-translations' instead of klaro.
See: v.0.7.18: https://cdn.kiprotect.com/klaro/v0.7.18/klaro-no-translations-no-css.js v.0.7.20: https://cdn.kiprotect.com/klaro/v0.7.20/klaro-no-translations-no-css.js v.0.7.22: https://cdn.kiprotect.com/klaro/v0.7.22/klaro-no-translations-no-css.js
Shouldn't it also be named 'klaro' here?
Thanks Mischa
See https://github.com/kiprotect/klaro/pull/529 Is already merged and you can use the dev version.
Ok, thanks! I have seen this issue, but I am a bit confused. I just downloaded the latest klaro-no-translations-no-css.js following the instructions on the Klaro website and here. Whether I take the file from the CDN or here from the dist directory of the repo, I always get the incorrect version. Am I missing something and how can I get the dev version?
You have to download the repo and build your own version, But I think in the next days (weeks?) the maintainer will release a new version.
In the meantime, you are welcome to use these versions that we have built ourselves for implementation in Drupal CMS: https://git.drupalcode.org/project/klaro_js (Please download the files and dont use them from this repo directly.)
Direct link: https://git.drupalcode.org/project/klaro_js/-/blob/3.0.x/dist/klaro-no-translations-no-css.js?ref_type=heads
We also use this version for Klaro Module in Drupal CMS.
Best regards from Berlin :-)
I already use the Drupal module in projects ;) That's how I noticed the differences between the versions.
Many thanks and best regards also from Berlin :-)
Oh, cool! Feel free to open issues, feature request etc. on drupal.org :)
Jan Kellermann