Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with FPC #13

Open
Motomotors opened this issue Feb 26, 2016 · 4 comments
Open

Conflict with FPC #13

Motomotors opened this issue Feb 26, 2016 · 4 comments

Comments

@Motomotors
Copy link

Hi,

Thank you for this module, Its very cool!

I would to know how can I exclude an inline javascript? I can't figure out.
Example:
<script type="text/javascript"> var <?php echo $Id ?> = new Stuff( '<?php echo $Id ?>Container', '<?php echo $this->getAjaxUrl() ?>', '<?php echo $this->__('Loading...')?>', ); </script>

The problem is the dynamic block cacheing, when fpc is working It caches the moved js in footer but also put back inline javascript to it's original position, and this duplication cause errors. If I prevent to move those inline javascript, that will solve the problem, I guess.

Thank you!

@Randydedecker
Copy link

You can add a class name to the inline javascript, this works as well.

I had the same problem. You have to exclude prototype.js as well, otherwise the AJAX call still does not work.

@Motomotors
Copy link
Author

Motomotors commented May 28, 2016

Thank you for your answer. I see, but I have no clue what I should to write in the Exclude List at backend. I am not that level to understand regex :D
I added a class name like this:
<script type="text/javascript" class="donttouch"> truncateOptions(); decorateList('cart-sidebar', 'none-recursive'); $j('document').ready(function() { var minicartOptions = {formKey: "<?php echo $this->getFormKey();?>"} var Mini = new Minicart(minicartOptions); Mini.init(); }); </script>

@connectjames
Copy link

Any news on this matter? What regex to include to exclude the inline js?

@connectjames
Copy link

Actually you just need to put the class in between /
So here :
/donttouch/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants