CMS Development

ROgtip
Member

indexOf is not a function error in template act21.min.js file

SOLVE

All pages in our site is now showing a javascript error thrown by jquery and is related to 

https://cdn2.hubspot.net/hubfs/273774/mp/act2/js/act21.min.js

 

It looks like act21.min.js is using a deprecated .load function which jquery is no longer supporting.

 

Is there an update to act21.min.js file?

Untitled.png

 

act21.min.js is loaded in the global template and shows a comment that it is a must

0 Upvotes
2 Accepted solutions
piersg
Solution
Key Advisor

indexOf is not a function error in template act21.min.js file

SOLVE

@ROgtip Act2.1 is a theme from these guys. I suggest contacting their support for help with this.

View solution in original post

Anton
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

indexOf is not a function error in template act21.min.js file

SOLVE

Hi @ROgtip

We're using /used Act 2.1 a lot for some customers. But the main reason why we have stopped using it is that it's very old(i assume around 3-4 years) and there wasn't a big update since then. This means: It rely on the HubSpot functionality from that time -> very old jQuery as example. 

I would recommend to move on to a new theme(there are great ones out there) in the near future.

I had to display a Act Mega menu/header in a brand new developed HubSpot theme recently - it had a massive impact on page speed since the only way that I came along was to load the new jQuery for the theme AND the old unminified(!) one. Lost nearly 25 Points on Desktop at Google page speed.

 

Have you disabled or changed the jQuery option(s) in the Hub settings(Settings->Website->Pages)? 
Try to enable the 1.10 version - it should be fine. 
Or paste this code above the Footer Act JS script.

 

It should look like this: 

<!-- act21.min.js required by all components. Please do not delete. -->
<script src="https://code.jquery.com/jquery-1.10.0.js" integrity="sha256-iqD4S1Mx78w8tyx9UEwrxuvYYdoAPXLDPfmc5lDUUx0=" crossorigin="anonymous"></script>
<script src="https://cdn2.hubspot.net/hubfs/273774/mp/act2/js/act21.min.js"></script>

 

 

best, 

Anton

Anton Bujanowski Signature

View solution in original post

3 Replies 3
piersg
Solution
Key Advisor

indexOf is not a function error in template act21.min.js file

SOLVE

@ROgtip Act2.1 is a theme from these guys. I suggest contacting their support for help with this.

Anton
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

indexOf is not a function error in template act21.min.js file

SOLVE

Hi @ROgtip

We're using /used Act 2.1 a lot for some customers. But the main reason why we have stopped using it is that it's very old(i assume around 3-4 years) and there wasn't a big update since then. This means: It rely on the HubSpot functionality from that time -> very old jQuery as example. 

I would recommend to move on to a new theme(there are great ones out there) in the near future.

I had to display a Act Mega menu/header in a brand new developed HubSpot theme recently - it had a massive impact on page speed since the only way that I came along was to load the new jQuery for the theme AND the old unminified(!) one. Lost nearly 25 Points on Desktop at Google page speed.

 

Have you disabled or changed the jQuery option(s) in the Hub settings(Settings->Website->Pages)? 
Try to enable the 1.10 version - it should be fine. 
Or paste this code above the Footer Act JS script.

 

It should look like this: 

<!-- act21.min.js required by all components. Please do not delete. -->
<script src="https://code.jquery.com/jquery-1.10.0.js" integrity="sha256-iqD4S1Mx78w8tyx9UEwrxuvYYdoAPXLDPfmc5lDUUx0=" crossorigin="anonymous"></script>
<script src="https://cdn2.hubspot.net/hubfs/273774/mp/act2/js/act21.min.js"></script>

 

 

best, 

Anton

Anton Bujanowski Signature
dennisedson
HubSpot Product Team
HubSpot Product Team

indexOf is not a function error in template act21.min.js file

SOLVE

Hey @ROgtip , who developed this?  I would reach out to them regarding that file.  What does act21.js do?

0 Upvotes