Error in Sitecatalyst implementation - Uncaught Typeerror: s.doPlugins is not a function

sujani_koya
Regular Visitor
sujani_koya
Hi! The Sitecatalyst tag is throwing the error Uncaught Typeerror: s.doPlugins is not a function This is the code in Tealium's Sitecatalyst JS file most likely causing the problem - if(s.usePlugins)s.doPlugins(s); This piece of code however is not present in either of the 2 SC extensions in Tealium. So unable to change it directly. There is a related piece of code in â SiteCatalyst do_Plugins Functionâ extension which is window.s.doPlugins=s_doPlugins; So here if the code in the Tealium JS is changed to if(s.usePlugins)window.s.doPlugins(s); or if(s.usePlugins)s_doPlugins(s); it could work. Or should it be window.s.doPlugins(s)=s_doPlugins(s) in the second extension? What should be done? Thanks a lot.
6 REPLIES 6

Error in Sitecatalyst implementation - Uncaught Typeerror: s.doPlugins is not a function

Tealium Employee
Most likely your s_doPlugins function is not defined in the global namespace. // Define the s_doPlugins function in the global namespace window.s_doPlugins = function(s){ // my doPlugins code }

Error in Sitecatalyst implementation - Uncaught Typeerror: s.doPlugins is not a function

sujani_koya
Regular Visitor
sujani_koya
Hi Ty, thank you for replying. Actually s_doPlugins is defined but looks a little different. function s_doPlugins(s){ // ~1000 lines of code } Do you suggest I rename this function or write another function just like you said?

Error in Sitecatalyst implementation - Uncaught Typeerror: s.doPlugins is not a function

sujani_koya
Regular Visitor
sujani_koya
Hi Ty, I tried 2 things - 1. window.s_doPlugins = function(s){ instead of function s_doPlugins(s){ and 2. window.s.doPlugins(s)=s_doPlugins(s); instead of window.s.doPlugins=s_doPlugins; Both did not work. What else can I do to rectify the error? How to access this line - if(s.usePlugins)s.doPlugins(s); That is not in either of the 2 Sitecatalyst extensions. Thank you, Sujani
Highlighted

Error in Sitecatalyst implementation - Uncaught Typeerror: s.doPlugins is not a function

Tealium Employee
There may be something else going on here. A few things to check: (1) Is your JS Extension scoped to your SiteCatalyst tag? (2) Is the configuration for your tag set to use the "s" object? // Sample SiteCatalyst JS Extension in Tealium s.usePlugins=true; window.s_doPlugins = function(s) { // custom code here utag.DB("Inside s_doPlugins function"); } s.doPlugins=window.s_doPlugins;

Error in Sitecatalyst implementation - Uncaught Typeerror: s.doPlugins is not a function

sujani_koya
Regular Visitor
sujani_koya
Hi Ty, The answer is yes to both your questions. I tried the exact code you suggested. I am still getting the clicktracking error.

Error in Sitecatalyst implementation - Uncaught Typeerror: s.doPlugins is not a function

sujani_koya
Regular Visitor
sujani_koya
Thanks a lot for your attention Ty. The problem turned out to be somewhere else. It was outside of Tealium. Thank you Ty.