<?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 Re: js uploaded in Design Manager returns Uncaught SyntaxError in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/js-uploaded-in-Design-Manager-returns-Uncaught-SyntaxError/m-p/743764#M32381</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/114957"&gt;@Syeda_Fatima&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had async there before, I removed to make the line as simple as possible trying to solve the issue, no success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if I use the full URL from my theme instead of get_asset_url, the issue persist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Uncaught SyntaxError: unexpected token: ')'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;and the same file loading from outside Hubspot, loads fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Maybe is something to do with the minifying process on Hubspot?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 07:07:23 GMT</pubDate>
    <dc:creator>gsantos1</dc:creator>
    <dc:date>2023-01-19T07:07:23Z</dc:date>
    <item>
      <title>js uploaded in Design Manager returns Uncaught SyntaxError</title>
      <link>https://community.hubspot.com/t5/CMS-Development/js-uploaded-in-Design-Manager-returns-Uncaught-SyntaxError/m-p/743712#M32379</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I'm trying to solve this for sometime now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I uploaded the fancybox.umd.js on my site template folder in Design Manager. I tried to load with 2 different methods, both return the same error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;{{ require_js(get_asset_url("/THEMENAME/js/fancybox.umd.js")) }}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script src="{{ get_asset_url('/THEMENAME/js/fancybox.umd.js') }}"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Uncaught &lt;SPAN class=""&gt;SyntaxError: &lt;SPAN class=""&gt;unexpected token: ')'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It only works loading from fancybox CDN, but I want to avoid add another domain to the site loading because of performance, so I need to load from my domain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has you seen this before?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 02:49:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/js-uploaded-in-Design-Manager-returns-Uncaught-SyntaxError/m-p/743712#M32379</guid>
      <dc:creator>gsantos1</dc:creator>
      <dc:date>2023-01-19T02:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: js uploaded in Design Manager returns Uncaught SyntaxError</title>
      <link>https://community.hubspot.com/t5/CMS-Development/js-uploaded-in-Design-Manager-returns-Uncaught-SyntaxError/m-p/743761#M32380</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/113263"&gt;@gsantos1&lt;/a&gt;&amp;nbsp;yes, and&amp;nbsp;I would suggest you to try loading the script with the async attribute set to true. This will allow the script to load without blocking the rest of the page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;script src="{{ get_asset_url('/THEMENAME/js/fancybox.umd.js') }}" async&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 06:59:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/js-uploaded-in-Design-Manager-returns-Uncaught-SyntaxError/m-p/743761#M32380</guid>
      <dc:creator>Syeda_Fatima</dc:creator>
      <dc:date>2023-01-19T06:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: js uploaded in Design Manager returns Uncaught SyntaxError</title>
      <link>https://community.hubspot.com/t5/CMS-Development/js-uploaded-in-Design-Manager-returns-Uncaught-SyntaxError/m-p/743764#M32381</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/114957"&gt;@Syeda_Fatima&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had async there before, I removed to make the line as simple as possible trying to solve the issue, no success.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if I use the full URL from my theme instead of get_asset_url, the issue persist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Uncaught SyntaxError: unexpected token: ')'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;and the same file loading from outside Hubspot, loads fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Maybe is something to do with the minifying process on Hubspot?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 07:07:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/js-uploaded-in-Design-Manager-returns-Uncaught-SyntaxError/m-p/743764#M32381</guid>
      <dc:creator>gsantos1</dc:creator>
      <dc:date>2023-01-19T07:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: js uploaded in Design Manager returns Uncaught SyntaxError</title>
      <link>https://community.hubspot.com/t5/CMS-Development/js-uploaded-in-Design-Manager-returns-Uncaught-SyntaxError/m-p/743772#M32382</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/113263"&gt;@gsantos1&lt;/a&gt;,&amp;nbsp;&lt;SPAN data-offset-key="5c433-98-0"&gt;I&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-99-0"&gt;'m&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-100-0"&gt; not&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-101-0"&gt; sure&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-102-0"&gt; what&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-103-0"&gt; is&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-104-0"&gt; causing&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-105-0"&gt; the&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-106-0"&gt; issue&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-107-0"&gt;.&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-108-0"&gt; It&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-109-0"&gt; could&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-110-0"&gt; be&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-111-0"&gt; related&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-112-0"&gt; to&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-113-0"&gt; the&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-114-0"&gt; min&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-115-0"&gt;ifying&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-116-0"&gt; process&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-117-0"&gt;,&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-118-0"&gt; or&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-119-0"&gt; it&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-120-0"&gt; could&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-121-0"&gt; be&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-122-0"&gt; related&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-123-0"&gt; to&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-124-0"&gt; the&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-125-0"&gt; way&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-126-0"&gt; the&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-127-0"&gt; file&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-128-0"&gt; is&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-129-0"&gt; being&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-130-0"&gt; loaded&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-131-0"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-offset-key="5c433-132-0"&gt;However, You&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-133-0"&gt; could&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-134-0"&gt; try&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-135-0"&gt; loading&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-136-0"&gt; the&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-137-0"&gt; file&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-138-0"&gt; directly&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-139-0"&gt; from&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-140-0"&gt; your&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-141-0"&gt; theme&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-142-0"&gt; instead&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-143-0"&gt; of&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-144-0"&gt; using&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-145-0"&gt; the&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-146-0"&gt; get&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-147-0"&gt;_&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-148-0"&gt;**bleep**&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-149-0"&gt;et&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-150-0"&gt;_&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-151-0"&gt;url&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-152-0"&gt;()&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-153-0"&gt; function&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-154-0"&gt; to&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-155-0"&gt; see&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-156-0"&gt; if&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-157-0"&gt; that&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-158-0"&gt; makes&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-159-0"&gt; any&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-160-0"&gt; difference&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-161-0"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-offset-key="5c433-162-0"&gt;And also&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-163-0"&gt;,&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-164-0"&gt; you&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-165-0"&gt; could&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-166-0"&gt; try&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-167-0"&gt; debugging&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-168-0"&gt; the&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-169-0"&gt; code&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-170-0"&gt; to&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-171-0"&gt; see&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-172-0"&gt; why&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-173-0"&gt; the&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-174-0"&gt; syntax&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-175-0"&gt; error&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-176-0"&gt; is&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-177-0"&gt; being&lt;/SPAN&gt;&lt;SPAN data-offset-key="5c433-178-0"&gt; thrown.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 07:18:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/js-uploaded-in-Design-Manager-returns-Uncaught-SyntaxError/m-p/743772#M32382</guid>
      <dc:creator>Syeda_Fatima</dc:creator>
      <dc:date>2023-01-19T07:18:19Z</dc:date>
    </item>
  </channel>
</rss>

