Embed element not updating
Hi, I try to embed the following widget on a page and the site won't update. It updates without this embed element. I already embeded a similar one without any issues.
Very strange.
<script type="text/javascript"> !function(){var e,t=document;e=function(){if(window.EMRPixel)return console.info("EMR: Pixel already loaded");var e=t.createElement("script");e.defer=!0,e.src="https://cdn2.revw.me/js/pixel.js?t="+864e5*Math.ceil(new Date/864e5);var n=t.getElementsByTagName("script")[0];n.charset="utf-8",n.parentNode.insertBefore(e,n),e.onload=function(){EMRPixel.init("app.rankranker.com",17)}},"interactive"===t.readyState||"complete"===t.readyState?e():t.addEventListener("DOMContentLoaded",e())}(); </script><emr-simple-carousel widget-id="a197b650-ab0f-42c2-84e9-341d10d4f632"></emr-simple-carousel>
-
Hi Jean-Pierre,
Thank you for contacting us.
If you are using WordFence, kindly temporarily disable it, clear your cache, and verify if this resolves the issue.
You may also consider temporarily setting it to Learning Mode, which will also resolve the issue:
https://www.wordfence.com/help/firewall/learning-mode/Please try this and let me know how it goes.
Best regards,
Ariel H.0 -
I found a solution. Brizy's embed element is having trouble with the script execution or the custom element. I loaded the script dynamically after the page has loaded. Could you add this to your bug fixes?
<div id="emr-review-container"></div>
<script>
window.addEventListener('load', function() {
// Load the pixel script
var pixelScript = document.createElement('script');
pixelScript.src = "https://cdn2.revw.me/js/pixel.js?t=" + 864e5 * Math.ceil(new Date() / 864e5);
pixelScript.onload = function() {
if (window.EMRPixel) {
EMRPixel.init("app.rankranker.com", 17);
}
};
document.body.appendChild(pixelScript);// Create the custom element
var carousel = document.createElement('emr-simple-carousel');
carousel.setAttribute('widget-id', 'a197b650-ab0f-42c2-84e9-341d10d4f632');
document.getElementById('emr-review-container').appendChild(carousel);
});
</script>0 -
there is no wordfence on Brizy Cloud
0 -
Hi Jean-Pierre,
Sorry for the confusion.
Unfortunately, not all scripts embedded in Brizy pages work will work as expected, some scripts will require modification to work. Sorry for the inconvenience.
Best regards,
Ariel H.0
Please sign in to leave a comment.
Comments
4 comments