klaro-org / klaro-js

Klaro Privacy Manager. An open-source, privacy-friendly & compliant consent manager for your website.
https://klaro.org
Other
1.19k stars 253 forks source link

Joomla! Integration #197

Open marius-social opened 4 years ago

marius-social commented 4 years ago

I'm trying to implement klaro on a client site using Joomla!. Integration of the files was a bit tricky, since Joomla! won't let me upload the config.js for security reasons (prevention of Cross-site scripting).

Putting the code of the config.js in a new file directly in Joomla! was a work around and both the klaro.js and config.js are loaded without any problems in the console.

Still, the consent modal won't show up. Neither the standard configuration nor the mustConsent function or the review link (klaro.show(klaroConfig)) won't give me the consent modal.

I'm assuming Joomla! blocks the correct execution of the config.js for the above mentioned XSS problems.

Would it be possible to execute klaro locally without pulling scripts from another server?

Or has anyone any idea how I can solve the overall problem?

caos30 commented 4 years ago

"Would it be possible to execute klaro locally without pulling scripts from another server?" i don't know that this is needed. At least not in the klaro plugin for wordpress.

regarding your problems to get loaded the consent modal be sure to load config.js of Klaro ONCE THE JQUERY has been loaded. Sincerely, i had similiar like yours and i finally couldn't do this: run some extra javascript code acting over klaro object due to this issue.

Certainly, i foun very difficult to understand this javascript project (klaro). It's very nice the result, but it miss more documentation or at least a clean way to understand how to "hack" it.

I arrived to your comment just trying to understand why the bottom buttons "delcine" and "accept" not run very well: tey close modal little box on bottom right, but doesn't do nothing more... i'm getting crazy to understand the config.js and klaro.js... :-(