Modal Button Not working

Hello Team,

I’m using Cornerstone and WP Rocket Plugin for my WordPress site.
But there is a bug between Cornerstone Modal Button and WP Rocket.
For some reason, the modal button sometimes not working because of Cache problem.
The modal button is working for the first time but after refresh the page and then it’s not triggering to the modal show. I’m sure it’s conflict with WP Rocket.

The other component like button is working well with WP Rocket but modal button not working.

Can you investigate it?

Thanks,

Hello David,

Thank you for the inquiry.

Have you tried toggling some options in the WP Rocket plugin? Sometimes, adjusting or disabling certain features can resolve this issue.

We may need to check the site to investigate further. Please provide the login details in the secure note field.

Best regards,
Ismael

Hello Team,

I created staging site for it.
Please check it.
There are several modal buttons on the homepage.
When first visit, modal button is working well but after refresh the page, it’s not working.
It’s conflicting with WP Rocket plugin.

Thanks,
Ariel

Thank you for the update.

We disabled WP Rocket’s File Optimization > JavaScript Files > Delay JavaScript Execution and it seems to have fixed the issue with the Modal element. We tested it on different browsers. Please make sure to purge the cache before testing the modal again.

Warm regards.

But I need to use the Delay Javascript Execution option.
So I set those options for Excluded JavaScript Files in the red line, but it seems not working.


/wp-content/themes/pro/cornerstone/assets/js/site/(.).js
/wp-content/themes/pro/framework/dist/js/site/(.
).js

We also tried excluding the js assets from minification and concatenation.

/wp-content/themes/pro/cornerstone/assets/js/site/(.*).js
/wp-content/themes/pro/framework/dist/js/site/(.*).js

The modal element works but the page has to load completely. Please make sure to purge the cache before testing the modal.

Warm regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.