<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic JS error on page but not on template causing functionality to not work in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/JS-error-on-page-but-not-on-template-causing-functionality-to/m-p/200057#M7284</link>
    <description>&lt;P&gt;I have these scripts that launch a video overlay when a button is clicked on my homepage&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Script in template head&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;script src="https://fast.wistia.com/embed/medias/ci1kb2r0is.jsonp" async&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script src="https://fast.wistia.com/assets/external/E-v1.js" async&amp;gt;&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Button HTML on template&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;p&amp;gt;&amp;lt;span class="wistia_embed wistia_async_ci1kb2r0is popover=true popoverContent=link" style="display: inline; position: relative;"&amp;gt;&amp;lt;a class="shadow-box btn btn-green" style="display: inline-block;" href="#"&amp;gt;HOW AVANAN WORKS &amp;lt;img src="https://www.avanan.com/hubfs/play-button-1.png" alt="" title="play-button.png" width="25" style="width: 25px;"&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works fine on the template and when I preview the template.&lt;BR /&gt;&lt;BR /&gt;However when editing the page, Hubspot changes the HTML automatically to the following&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;button HTML on page editor&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;div id="wistia_47.thumb_container" class="wistia_click_to_play" style="position: relative; display: inline;"&amp;gt;&amp;lt;a class="shadow-box btn btn-green" style="display: inline-block;" href="#"&amp;gt;HOW AVANAN WORKS &amp;lt;img src="https://www.avanan.com/hubfs/play-button-1.png" alt="" title="play-button.png" width="25" style="width: 25px;"&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the functionality does not work. Instead I get the following error:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="javascript error .png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/10823iBD2D352F618AB2E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="javascript error .png" alt="javascript error .png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;How can I fix so the functionality on the page matches that of the template?&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jul 2018 18:45:51 GMT</pubDate>
    <dc:creator>DylanPress</dc:creator>
    <dc:date>2018-07-31T18:45:51Z</dc:date>
    <item>
      <title>JS error on page but not on template causing functionality to not work</title>
      <link>https://community.hubspot.com/t5/CMS-Development/JS-error-on-page-but-not-on-template-causing-functionality-to/m-p/200057#M7284</link>
      <description>&lt;P&gt;I have these scripts that launch a video overlay when a button is clicked on my homepage&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Script in template head&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;script src="https://fast.wistia.com/embed/medias/ci1kb2r0is.jsonp" async&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script src="https://fast.wistia.com/assets/external/E-v1.js" async&amp;gt;&amp;lt;/script&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Button HTML on template&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;p&amp;gt;&amp;lt;span class="wistia_embed wistia_async_ci1kb2r0is popover=true popoverContent=link" style="display: inline; position: relative;"&amp;gt;&amp;lt;a class="shadow-box btn btn-green" style="display: inline-block;" href="#"&amp;gt;HOW AVANAN WORKS &amp;lt;img src="https://www.avanan.com/hubfs/play-button-1.png" alt="" title="play-button.png" width="25" style="width: 25px;"&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works fine on the template and when I preview the template.&lt;BR /&gt;&lt;BR /&gt;However when editing the page, Hubspot changes the HTML automatically to the following&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;button HTML on page editor&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;div id="wistia_47.thumb_container" class="wistia_click_to_play" style="position: relative; display: inline;"&amp;gt;&amp;lt;a class="shadow-box btn btn-green" style="display: inline-block;" href="#"&amp;gt;HOW AVANAN WORKS &amp;lt;img src="https://www.avanan.com/hubfs/play-button-1.png" alt="" title="play-button.png" width="25" style="width: 25px;"&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the functionality does not work. Instead I get the following error:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="javascript error .png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/10823iBD2D352F618AB2E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="javascript error .png" alt="javascript error .png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;How can I fix so the functionality on the page matches that of the template?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 18:45:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/JS-error-on-page-but-not-on-template-causing-functionality-to/m-p/200057#M7284</guid>
      <dc:creator>DylanPress</dc:creator>
      <dc:date>2018-07-31T18:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: JS error on page but not on template causing functionality to not work</title>
      <link>https://community.hubspot.com/t5/CMS-Development/JS-error-on-page-but-not-on-template-causing-functionality-to/m-p/200140#M7291</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/11826"&gt;@DylanPress&lt;/a&gt;&amp;nbsp;- Can you try changing the span to a div and remove the wrapping &amp;lt;p&amp;gt; tag and see if that works?&lt;/P&gt;&lt;PRE&gt;&amp;lt;div class="wistia_embed wistia_async_ci1kb2r0is popover=true popoverContent=link" style="display: inline; position: relative;"&amp;gt;
  &amp;lt;a class="shadow-box btn btn-green" style="display: inline-block;" href="#"&amp;gt;HOW AVANAN WORKS &amp;lt;img src="https://www.avanan.com/hubfs/play-button-1.png" alt="" title="play-button.png" width="25" style="width: 25px;"&amp;gt;
  &amp;lt;/a&amp;gt;
&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;HR /&gt;&lt;P&gt;If this answer helped, please, mark as solved &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;tim@belch.io | &lt;A href="https://forms.belch.io" target="_blank"&gt;forms.belch.io&lt;/A&gt; | Design your own Beautiful HubSpot Forms; No coding necessary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Drop by and say Hi to me &lt;A href="http://slack.belch.io/" target="_blank"&gt;on slack&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 12:18:58 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/JS-error-on-page-but-not-on-template-causing-functionality-to/m-p/200140#M7291</guid>
      <dc:creator>tjoyce</dc:creator>
      <dc:date>2018-08-01T12:18:58Z</dc:date>
    </item>
  </channel>
</rss>

