Morning Marcell;
Cookie-notice depends on jquery, so you’ll have to exclude that from JS optimization as well. Additionally, based on the code, it seems to also inject JS inline in the HTML, which might need to be excluded as well.
hope this helps,
frank
Hello Frank,
Thanks for your note, I have jquery now added to the exceptions list but unfortunately it is still not working. In the test environment I was looking for the inline code and found the following:
<script type='text/javascript'>
/* <![CDATA[ */
var cnArgs = {"ajaxurl":"http:\/\/localhost\/wordpress2\/wp-admin\/admin-ajax.php","hideEffect":"fade","onScroll":"no","onScrollOffset":"100","cookieName":"cookie_notice_accepted","cookieValue":"TRUE","cookieTime":"2592000","cookiePath":"\/wordpress2\/","cookieDomain":""};
/* ]]> */
</script>
<script type='text/javascript' src='http://localhost/wordpress2/wp-content/plugins/cookie-notice/js/front.js?ver=1.2.32'></script>
Have you any idea how I can rule the relevant part of AutoOptimize? I know that this is possible if the tag <! – Noptimize -> starts. I use this with another plugin. I can think of only one way not to put the appropriate tags for the moment.
Thank you
Marcell
You can exclude inline JS by adding an “identifier string” from that inline JS to your exclusion list (cfr. FAQ). In this case I would add e.g. cnArgs or cookie_notice_accepted.
frank
Hello Frank,
I nerve you hopefully not because I still stuck. The variables I added. Unfortunately, the cookie information is still not appeared on. My exclusion list looks like this:
s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client,nonce,post_id,front.js,jquery.js,jquery-migrate.min.js,cnArgs,cookie_notice_accepted.
Thank you
Marcell
ok, can you open up your browser’s error console and check if there are any relevant errors showing?
frank
Hello there,
My mistake Console shows me no error. I have all the time now installed and set to the Live system. For clarity, I have it turned off the HTML code compression. The address is: http://www.altenpflegeschueler.de/beschaeftigung/
Greetings,
Marcell
well, have no idea what is happening I’m afraid, esp. since cookie-notice works out of the box on my test-blog, without any exclusion what-so-ever.
a couple of things you could try;
* disable other plugins and/or briefly switch theme to see if this is some kind of conflict
* try with the “try/catch” option in autoptimize
which this was easier Marcell … 🙂
frank