Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.8.4 (build 3094) - 14 September 2020 (please see announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

TypeError: $ .subscribe is not a function

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

Post Reply
tedybear57
Posts: 4
Joined: Sat 25 Apr 2020 7:30 pm
Weather Station: arduino
Operating System: windows 10

TypeError: $ .subscribe is not a function

Post by tedybear57 »

Hello, I have a little problem with the gauges I am installing them on my site to put the weather station data there but it does not work I have an error that goes back and I look for my I have not found can you help me ? I put the fault on you

Uncaught TypeError: $ .subscribe is not a function
     at init (gauges.js: 684)
     at Object.getInstance (gauges.js: 698)
     at init (gauges.js: 461)
     at HTMLDocument. <anonymous> (gauges.js: 4210)
     at j (jquery-3.2.1.min.js: 2)
     at k (jquery-3.2.1.min.js: 2)

Thank you

water01
Posts: 1975
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: TypeError: $ .subscribe is not a function

Post by water01 »

Could we have a link to your web site please as that may help us diagnose the problem.
David
Image

sfws
Posts: 929
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: --
Operating System: --

Re: TypeError: $ .subscribe is not a function

Post by sfws »

(text removed as not relevant)
Last edited by sfws on Sun 26 Apr 2020 1:31 pm, edited 1 time in total.

User avatar
HansR
Posts: 1379
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: TypeError: $ .subscribe is not a function

Post by HansR »

Just a guess: do you include jQuery.js twice or more?
https://meteo-wagenborgen.nl / Cumulus 3.6.8 (build: 3084)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Buster / 5.4.51-v7+ armv7l (before: 4.19.118)
Mono JIT compiler version 6.10.0.104 (before: 6.8.0.123)

tedybear57
Posts: 4
Joined: Sat 25 Apr 2020 7:30 pm
Weather Station: arduino
Operating System: windows 10

Re: TypeError: $ .subscribe is not a function

Post by tedybear57 »

Thank you for your answers

Unfortunately the site and not online I am developing it locally on my computer using symfony 5.

I use Jquery 3.2.1 as in the demo site which and data in the zip.

And for the last question yes I use it on the basic page for Bootstrap that poses problem?

User avatar
mcrossley
Posts: 6932
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Buster Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: TypeError: $ .subscribe is not a function

Post by mcrossley »

Yes, including jQuery a second time will recreate the $ object. The gauge code extends the jQuery $ object by adding the publish/subscribe functionality.

User avatar
HansR
Posts: 1379
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: TypeError: $ .subscribe is not a function

Post by HansR »

tedybear57 wrote:
Sun 26 Apr 2020 10:16 am
And for the last question yes I use it on the basic page for Bootstrap that poses problem?
What @mcrossley says. Yes including jQuery more than once poses problems as I experienced recently.
https://meteo-wagenborgen.nl / Cumulus 3.6.8 (build: 3084)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Buster / 5.4.51-v7+ armv7l (before: 4.19.118)
Mono JIT compiler version 6.10.0.104 (before: 6.8.0.123)

tedybear57
Posts: 4
Joined: Sat 25 Apr 2020 7:30 pm
Weather Station: arduino
Operating System: windows 10

Re: TypeError: $ .subscribe is not a function

Post by tedybear57 »

Ok i will test and i will come back to you to tell you anyway already thank you

tedybear57
Posts: 4
Joined: Sat 25 Apr 2020 7:30 pm
Weather Station: arduino
Operating System: windows 10

Re: TypeError: $ .subscribe is not a function

Post by tedybear57 »

It was good thanks for the help

Post Reply