# Widgets Not Working

**URL:** <https://community.purpleair.com/t/widgets-not-working/10597>\
**Category:** Real-Time Map\
**Created:** [October 30, 2024, 11:37am UTC](https://community.purpleair.com/t/widgets-not-working/10597 "2024-10-30T11:37:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![StormChaser45662](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/stormchaser45662/32/4726_2.png) [@StormChaser45662](https://community.purpleair.com/u/StormChaser45662)\
**Post date:** [October 30, 2024, 11:37am UTC](https://community.purpleair.com/t/widgets-not-working/10597/1 "2024-10-30T11:37:40Z")

</div>

Why aren’t the widgets working on my website anymore?

 ![Screenshot_347](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/a/a7f9fbe92037d7bca879297df62e574c0d21e23a.jpeg)  
[PurpleAir Local Air Quality Sensors](http://stormchasercenter.net/PurpleAir.aspx)

---

<div class="post-metadata">

**Author:** ![ctandy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/ctandy/32/1594_2.png) [@ctandy](https://community.purpleair.com/u/ctandy)\
**Post date:** [October 30, 2024, 6:41pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/2 "2024-10-30T18:41:02Z")

</div>

Same… all of a sudden the widgets aren’t working.

---

<div class="post-metadata">

**Author:** ![richard47](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@richard47](https://community.purpleair.com/u/richard47)\
**Post date:** [October 30, 2024, 9:01pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/3 "2024-10-30T21:01:06Z")

</div>

Same problem here, my web page normally displays three widgets and now the spinner just spins and the widgets are never displayed. Links to the map showing where each sensor is does work. So sensors seem to be OK, just the widgets are failing.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/7/70ada1ca9e3f9408912f15d2b6c82cb6c2210a25.png)

---

<div class="post-metadata">

**Author:** ![skyepn](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/skyepn/32/3358_2.png) [@skyepn](https://community.purpleair.com/u/skyepn)\
**Post date:** [October 31, 2024, 12:30am UTC](https://community.purpleair.com/t/widgets-not-working/10597/4 "2024-10-31T00:30:54Z")

</div>

Same… endpoint is not returning valid JS

```auto
$ curl 'https://www.purpleair.com/widget.json?callback=jQuery35107784175020361858_1730334496234&show=135112&key=xxxx&_=1730334496235'
jQuery35107784175020361858_1730334496234 ({"mapVersionString":""})

```

---

<div class="post-metadata">

**Author:** ![skyepn](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/skyepn/32/3358_2.png) [@skyepn](https://community.purpleair.com/u/skyepn)\
**Post date:** [October 31, 2024, 12:37am UTC](https://community.purpleair.com/t/widgets-not-working/10597/5 "2024-10-31T00:37:14Z")

</div>

It looks like widget.json got changed to pa.widget.js when you get new widget code from the map. Hopefully the old URL can be fixed.

Edit: nevermind, the new widget code is also broken

---

<div class="post-metadata">

**Author:** ![StormChaser45662](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/stormchaser45662/32/4726_2.png) [@StormChaser45662](https://community.purpleair.com/u/StormChaser45662)\
**Post date:** [October 31, 2024, 1:28pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/6 "2024-10-31T13:28:44Z")

</div>

The widgets are now working! YIPPY!

 ![Screenshot_352](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/9/9384a09724452b739479d64f703cf03ef41fafaa.jpeg)

---

<div class="post-metadata">

**Author:** ![Kieran](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/kieran/32/6220_2.png) [@Kieran](https://community.purpleair.com/u/Kieran)\
**Post date:** [October 31, 2024, 10:02pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/7 "2024-10-31T22:02:26Z")

</div>

Yes @skyepn @richard47 @StormChaser45662 @ctandy

The widget issue should be fixed as of this morning. Please let us know if you continue to have problems.

---

<div class="post-metadata">

**Author:** ![StormChaser45662](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/stormchaser45662/32/4726_2.png) [@StormChaser45662](https://community.purpleair.com/u/StormChaser45662)\
**Post date:** [November 1, 2024, 9:28am UTC](https://community.purpleair.com/t/widgets-not-working/10597/8 "2024-11-01T09:28:05Z")

</div>

The only thing that still isn’t working on the widget is that is still showing I don’t have a micro SD card in it

 ![Screenshot_353](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/c/c170f47edeada97a08da2c58a682856ac97d46f8.jpeg)  
.

---

<div class="post-metadata">

**Author:** ![Kieran](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/kieran/32/6220_2.png) [@Kieran](https://community.purpleair.com/u/Kieran)\
**Post date:** [November 8, 2024, 5:32pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/10 "2024-11-08T17:32:06Z")

</div>

Hi @StormChaser45662

We released some updates for the widget that should have fixed this issue. Please let us know if you’re still experiencing it.

---

<div class="post-metadata">

**Author:** ![StormChaser45662](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/stormchaser45662/32/4726_2.png) [@StormChaser45662](https://community.purpleair.com/u/StormChaser45662)\
**Post date:** [November 8, 2024, 5:49pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/11 "2024-11-08T17:49:57Z")

</div>

Still not showing that the MicroSD Card is installed.

 ![1000002774](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/f/f43d7b4dcb7f8fd39661c85f14835a76279a7982.jpeg)

---

<div class="post-metadata">

**Author:** ![StormChaser45662](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/stormchaser45662/32/4726_2.png) [@StormChaser45662](https://community.purpleair.com/u/StormChaser45662)\
**Post date:** [November 20, 2024, 3:15pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/12 "2024-11-20T15:15:52Z")

</div>

It still doesn’t show that my microSD card in installed on the widget on my website, but it still does on the PurpleAir Website.  
[http://stormchasercenter.net/PurpleAir.aspx](http://stormchasercenter.net/PurpleAir.aspx)

> **(attachments)**
>
> ![Screenshot_397.jpg](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/5/5e0f323f4cb585d8d87da76e2e93bb2dbbf60826.jpeg)

---

<div class="post-metadata">

**Author:** ![Josh\_PurpleAir](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/josh_purpleair/32/2842_2.png) [@Josh\_PurpleAir](https://community.purpleair.com/u/Josh_PurpleAir)\
**Post date:** [November 26, 2024, 8:08pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/13 "2024-11-26T20:08:44Z")

</div>

@StormChaser45662, we recently pushed another update for the widget. Among other things, the SD detection issue is now fixed (we’ve verified this on your site as well).

---

<div class="post-metadata">

**Author:** ![Josh\_PurpleAir](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/josh_purpleair/32/2842_2.png) [@Josh\_PurpleAir](https://community.purpleair.com/u/Josh_PurpleAir)\
**Post date:** [November 26, 2024, 8:10pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/14 "2024-11-26T20:10:53Z")

</div>

@StormChaser45662 @ctandy @richard47 @skyepn

We’ve pushed an update to the widget with some fixes and improvements. If anything isn’t working properly, please let us know and include either your widget code or a public link.

---

<div class="post-metadata">

**Author:** ![Bill\_Burgess](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/bill_burgess/32/5968_2.png) [@Bill\_Burgess](https://community.purpleair.com/u/Bill_Burgess)\
**Post date:** [December 16, 2024, 5:41pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/15 "2024-12-16T17:41:52Z")

</div>

I’m trying to input a Widget on my high school course’s page:  
“”\<divid=‘PurpleAirWidget\_97817\_module\_US\_EPA\_AQI\_conversion\_C0\_average\_10\_layer\_US\_EPA\_AQI’\>Loading PurpleAir Widget… /div\>

"

But it shows this:

 ![widget moodle](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/9/96ed624a733aef7e72800f0d168ccb2f4bab9e23.png)

Any reason why it’s showing the wrong sensor?

---

<div class="post-metadata">

**Author:** ![StormChaser45662](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/stormchaser45662/32/4726_2.png) [@StormChaser45662](https://community.purpleair.com/u/StormChaser45662)\
**Post date:** [December 16, 2024, 6:05pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/18 "2024-12-16T18:05:33Z")

</div>

You need the following coding: below:

```auto

<div id='PurpleAirWidget_97817_module_US_EPA_AQI_conversion_C0_average_0_layer_US_EPA_AQI'>PurpleAir Widget Loading...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=3SC22UPQB38KU9G9&module=US_EPA_AQI&conversion=C0&average=0&layer=US_EPA_AQI&container=PurpleAirWidget_97817_module_US_EPA_AQI_conversion_C0_average_0_layer_US_EPA_AQI'></script>

```

---

<div class="post-metadata">

**Author:** ![richard47](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@richard47](https://community.purpleair.com/u/richard47)\
**Post date:** [December 27, 2024, 9:32am UTC](https://community.purpleair.com/t/widgets-not-working/10597/19 "2024-12-27T09:32:14Z")

</div>

I have five widgets on a page for Barcelona, air quality, temp in F, temp in C, humidity, and feels-like and suddenly they all show just the air quality, no temps or humidity. Looks like this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/f/f689e3b15a65123df3bdc434d85268f0098aeb26.png)

Code:

```auto
<h3>Barcelona &nbsp;&nbsp; <a href='https://map.purpleair.com/1/m/i/lt/mTEMP/a0/p604800/cC0?key=44VYEFQ3T76Z7SBH&select=111331#12.71/41.39233/2.14593' target='map'>Map</a></h3>
<script>showeuropetime();</script><br>
<div style='display : inline-flex;' id='PurpleAirWidget_134054_module_AQI_conversion_C0_average_0_layer_topo'>Loading PurpleAir Widgets. Please wait... <img src='./graphics/spinner.gif'></div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=AQI&conversion=C0&average=0&layer=topo&container=PurpleAirWidget_134054_module_AQI_conversion_C0_average_0_layer_topo'></script>

<div style='display : inline-flex;' id='PurpleAirWidget_134054_module_TEMP_conversion_C0_average_0_layer_topo'></div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=TEMP&conversion=C0&average=0&layer=topo&container=PurpleAirWidget_134054_module_TEMP_conversion_C0_average_0_layer_topo'></script>

<div style='display : inline-flex;' id='PurpleAirWidget_134054_module_TEMP_C_conversion_C0_average_0_layer_topo'></div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=TEMP_C&conversion=C0&average=0&layer=topo&container=PurpleAirWidget_134054_module_TEMP_C_conversion_C0_average_0_layer_topo'></script>

<div style='display : inline-flex;' id='PurpleAirWidget_134054_module_HUMIDITY_conversion_C0_average_0_layer_topo'></div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=HUMIDITY&conversion=C0&average=0&layer=topo&container=PurpleAirWidget_134054_module_HUMIDITY_conversion_C0_average_0_layer_topo'></script>
<div style='display : inline-flex;' id='PurpleAirWidget_134054_module_HUMIDEX_F_conversion_C0_average_0_layer_topo'></div>
Feels like
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=HUMIDEX_F&conversion=C0&average=0&layer=topo&container=PurpleAirWidget_134054_module_HUMIDEX_F_conversion_C0_average_0_layer_topo'></script>
</div>

```

---

<div class="post-metadata">

**Author:** ![StormChaser45662](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/stormchaser45662/32/4726_2.png) [@StormChaser45662](https://community.purpleair.com/u/StormChaser45662)\
**Post date:** [December 27, 2024, 10:23am UTC](https://community.purpleair.com/t/widgets-not-working/10597/22 "2024-12-27T10:23:23Z")

</div>

Here is the new Coding for the PurleAir Widgets  
[http://stormchasercenter.net/testerpage.aspx](http://stormchasercenter.net/testerpage.aspx)

```auto
<div id='PurpleAirWidget_134054_module_US_EPA_AQI_conversion_C0_average_0_layer_US_EPA_AQI'>PurpleAir Widget Loading...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=US_EPA_AQI&conversion=C0&average=0&layer=US_EPA_AQI&container=PurpleAirWidget_134054_module_US_EPA_AQI_conversion_C0_average_0_layer_US_EPA_AQI'></script>

<div id='PurpleAirWidget_134054_module_TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION_conversion_C0_average_0_layer_TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION'>Loading PurpleAir Widget...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION&conversion=C0&average=0&layer=TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION&container=PurpleAirWidget_134054_module_TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION_conversion_C0_average_0_layer_TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION'></script>

<div id='PurpleAirWidget_134054_module_TEMPERATURE_CELSIUS_SIMPLE_CORRECTION_conversion_C0_average_0_layer_TEMPERATURE_CELSIUS_SIMPLE_CORRECTION'>Loading PurpleAir Widget...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=TEMPERATURE_CELSIUS_SIMPLE_CORRECTION&conversion=C0&average=0&layer=TEMPERATURE_CELSIUS_SIMPLE_CORRECTION&container=PurpleAirWidget_134054_module_TEMPERATURE_CELSIUS_SIMPLE_CORRECTION_conversion_C0_average_0_layer_TEMPERATURE_CELSIUS_SIMPLE_CORRECTION'></script>

<div id='PurpleAirWidget_134054_module_RELATIVE_HUMIDITY_SIMPLE_CORRECTION_conversion_C0_average_0_layer_RELATIVE_HUMIDITY_SIMPLE_CORRECTION'>Loading PurpleAir Widget...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=RELATIVE_HUMIDITY_SIMPLE_CORRECTION&conversion=C0&average=0&layer=RELATIVE_HUMIDITY_SIMPLE_CORRECTION&container=PurpleAirWidget_134054_module_RELATIVE_HUMIDITY_SIMPLE_CORRECTION_conversion_C0_average_0_layer_RELATIVE_HUMIDITY_SIMPLE_CORRECTION'></script>

<div id='PurpleAirWidget_134054_module_ESTIMATED_HUMIDEX_FAHRENHEIT_conversion_C0_average_0_layer_ESTIMATED_HUMIDEX_FAHRENHEIT'>Loading PurpleAir Widget...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=ESTIMATED_HUMIDEX_FAHRENHEIT&conversion=C0&average=0&layer=ESTIMATED_HUMIDEX_FAHRENHEIT&container=PurpleAirWidget_134054_module_ESTIMATED_HUMIDEX_FAHRENHEIT_conversion_C0_average_0_layer_ESTIMATED_HUMIDEX_FAHRENHEIT'></script>

```

---

<div class="post-metadata">

**Author:** ![StormChaser45662](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/stormchaser45662/32/4726_2.png) [@StormChaser45662](https://community.purpleair.com/u/StormChaser45662)\
**Post date:** [December 27, 2024, 12:22pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/23 "2024-12-27T12:22:28Z")

</div>

![Screenshot_429](https://us1.discourse-cdn.com/flex020/uploads/purpleair/original/2X/1/168630c1c65f8e6a88e3d345a22ee2c00090a885.jpeg)

```auto
<div id='PurpleAirWidget_134054_module_US_EPA_AQI_conversion_C0_average_0_layer_US_EPA_AQI'>PurpleAir Widget Loading...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=US_EPA_AQI&conversion=C0&average=0&layer=US_EPA_AQI&container=PurpleAirWidget_134054_module_US_EPA_AQI_conversion_C0_average_0_layer_US_EPA_AQI'></script>

<div id='PurpleAirWidget_134054_module_TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION_conversion_C0_average_0_layer_TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION'>Loading PurpleAir Widget...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION&conversion=C0&average=0&layer=TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION&container=PurpleAirWidget_134054_module_TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION_conversion_C0_average_0_layer_TEMPERATURE_FAHRENHEIT_SIMPLE_CORRECTION'></script>

<div id='PurpleAirWidget_134054_module_TEMPERATURE_CELSIUS_SIMPLE_CORRECTION_conversion_C0_average_0_layer_TEMPERATURE_CELSIUS_SIMPLE_CORRECTION'>Loading PurpleAir Widget...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=TEMPERATURE_CELSIUS_SIMPLE_CORRECTION&conversion=C0&average=0&layer=TEMPERATURE_CELSIUS_SIMPLE_CORRECTION&container=PurpleAirWidget_134054_module_TEMPERATURE_CELSIUS_SIMPLE_CORRECTION_conversion_C0_average_0_layer_TEMPERATURE_CELSIUS_SIMPLE_CORRECTION'></script>

<div id='PurpleAirWidget_134054_module_RELATIVE_HUMIDITY_SIMPLE_CORRECTION_conversion_C0_average_0_layer_RELATIVE_HUMIDITY_SIMPLE_CORRECTION'>Loading PurpleAir Widget...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=RELATIVE_HUMIDITY_SIMPLE_CORRECTION&conversion=C0&average=0&layer=RELATIVE_HUMIDITY_SIMPLE_CORRECTION&container=PurpleAirWidget_134054_module_RELATIVE_HUMIDITY_SIMPLE_CORRECTION_conversion_C0_average_0_layer_RELATIVE_HUMIDITY_SIMPLE_CORRECTION'></script>

<div id='PurpleAirWidget_134054_module_ESTIMATED_HUMIDEX_FAHRENHEIT_conversion_C0_average_0_layer_ESTIMATED_HUMIDEX_FAHRENHEIT'>Loading PurpleAir Widget...</div>
<script src='https://www.purpleair.com/pa.widget.js?key=BYEQQ1L7SXFR2XM9&module=ESTIMATED_HUMIDEX_FAHRENHEIT&conversion=C0&average=0&layer=ESTIMATED_HUMIDEX_FAHRENHEIT&container=PurpleAirWidget_134054_module_ESTIMATED_HUMIDEX_FAHRENHEIT_conversion_C0_average_0_layer_ESTIMATED_HUMIDEX_FAHRENHEIT'></script>

```

---

<div class="post-metadata">

**Author:** ![richard47](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@richard47](https://community.purpleair.com/u/richard47)\
**Post date:** [December 28, 2024, 9:23am UTC](https://community.purpleair.com/t/widgets-not-working/10597/24 "2024-12-28T09:23:46Z")

</div>

Thank you for sending the new code. I’m surprised that they would pull the rug out from under us and break all the existing systems displaying widgets. I was hoping that they would make a simple change to display the local date and time of the sensor instead of always showing the date and time of the computer displaying the widget.

---

<div class="post-metadata">

**Author:** ![StormChaser45662](https://sea2.discourse-cdn.com/flex020/user_avatar/community.purpleair.com/stormchaser45662/32/4726_2.png) [@StormChaser45662](https://community.purpleair.com/u/StormChaser45662)\
**Post date:** [December 28, 2024, 1:35pm UTC](https://community.purpleair.com/t/widgets-not-working/10597/25 "2024-12-28T13:35:11Z")

</div>

They updated the codes because the old ones wasn’t working right.

[Next page](https://community.purpleair.com/t/widgets-not-working/10597.md?page=2)
