Expand my Community achievements bar.

SOLVED

eventscalendar.co embed script not working

Avatar

Level 1

Hi,

I created a new page by using the admin backend (Content->Pages). In the page editor, I added one row and an HTML code element to that page.


In that HTML code element, I have the following code:

<div data-events-calendar-app data-project-id="proj_id" ></div>
<script type="text/javascript" src="https://dist.eventscalendar.co/embed.js"></script>
This HTML code initailly gave a console error saying that it violates CSP regulations. That is why I added it to the csp_whitelist.xml in my custom CSP module. By doing this, the error went away and js was being fetched as you can see the following screenshot in the Network tab of developer tools.

RishabhTa_2-1729170206079.png

 

Even after doing all this, the js is not working as expected. It should populate the upper div with the content using the proj_key. 
Any idea why is this hapenning?

PS I am new to magento.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @RishabhTa 
I would recommend to move this thread to Magento community to get opinion from dedicated experts

https://community.magento.com/ 



Arun Patidar

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @RishabhTa 
I would recommend to move this thread to Magento community to get opinion from dedicated experts

https://community.magento.com/ 



Arun Patidar

Avatar

Community Advisor

Hi @RishabhTa ,

You may cross check you micro-frontend

<div events-calendar-app project-id="proj_DG8gvBPxWa4opUj16rmHj"></div><script type="text/javascript" src="//dist.eventscalendar.co/main.js"></script>

https://www.eventscalendar.co/

MukeshYadav__0-1729239776845.png

 

Thanks