Problem with dashboard dropdown between node-red 1.1.3 and 1.2.2

Hi all. I'm having trouble with something that was (and still is) working fine on one machine running node-red 1.1.3, but not on a new installation on another machine that has 1.2.2 installed.

I'm sending images from a dashboard dropdown menu to a ui builder display page. Some of you were key to me getting this working in the first place a few months ago!

In the end I was sending {"url": "./images/diaryjan17.jpg"} from the dropdown, but it was going through a JSON parser node to convert it to an object. In the new installation, the images just weren't appearing. I managed to discover with some debugging that the new version seemed to be recognising it as an object automatically, so the parser node was converting it back to a string. So, I removed the parser node and the images started working again. Great, I thought, until I tried to send the same image a second time. I can send each different image just fine, but if I try and send an image I've already sent, it just sends out a blank string ("").

It won't send the same item again until I've restarted the flows.

I've had a look at the update logs to see if I could find anything that might explain this but didn't have any luck.

Anyone know why this might be? Obviously I'd rather get it working, if possible. But, if not can I just go back to the older 1.1.3 version that it does work on?

I have the same problem. I guess it depends on the amount of data sended to dropdown list as msg.options.

My node red: 1.0.6
Dashboard: 2.23.4

Can you share the drop down part of the flow plus it’s options ?

[{"id":"73236591.14d724","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"d7cdd1c2.30c7a8","type":"function","z":"73236591.14d724","name":"","func":"msg.options = [{\"11/02/2020, 03:03:57\": \"147\"},{\"11/06/2020, 21:06:02\": \"152\"}, {\"11/02/2020, 00:17:49\": \"139\"}, {\"11/02/2020, 00:38:26\": \"140\"}, {\"11/02/2020, 00:43:33\": \"141\"}, {\"11/02/2020, 00:45:36\": \"142\"}, {\"11/02/2020, 02:06:43\": \"143\"}, {\"11/02/2020, 02:26:15\": \"144\"}, {\"11/02/2020, 02:30:55\": \"145\"}, {\"11/02/2020, 02:45:25\": \"146\"}, {\"11/02/2020, 17:48:45\": \"148\"}, {\"11/02/2020, 21:53:19\": \"149\"}, {\"11/05/2020, 18:23:06\": \"150\"}, {\"11/06/2020, 19:04:43\": \"151\"}, {\"11/07/2020, 01:16:38\": \"153\"}, {\"11/07/2020, 15:12:14\": \"154\"}]\n// msg.options = flow.get(\"history\")\nmsg.payload = undefined\nreturn msg;","outputs":1,"noerr":0,"x":570,"y":280,"wires":[["5bb86e0b.55c09","13c3923.1cb3bee"]]},{"id":"5bb86e0b.55c09","type":"ui_dropdown","z":"73236591.14d724","name":"","label":"Select history test","tooltip":"","place":"Select test","group":"bc5f260e.c21108","order":1,"width":0,"height":0,"passthru":false,"multiple":false,"options":[],"payload":"","topic":"","x":770,"y":280,"wires":[["523e88ae.0b0168"]]},{"id":"647aaa93.664c4c","type":"inject","z":"73236591.14d724","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":420,"y":280,"wires":[["d7cdd1c2.30c7a8"]]},{"id":"13c3923.1cb3bee","type":"debug","z":"73236591.14d724","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":730,"y":320,"wires":[]},{"id":"523e88ae.0b0168","type":"change","z":"73236591.14d724","name":"","rules":[{"t":"set","p":"testid_history","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":280,"wires":[[]]},{"id":"bc5f260e.c21108","type":"ui_group","z":"","name":"Preview","tab":"ef6b470b.5faf58","order":8,"disp":false,"width":"23","collapse":false},{"id":"ef6b470b.5faf58","type":"ui_tab","z":"","name":"Dashboard","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

When I add msg.options and set one of them on my dashboard its ok, but when I set another one and after I want to set this first variable again in global variables I can see only ("").

Excellent... Bug confirmed.
Fix pushed to master on github, not yet on npm.

1 Like

Nice to know it wasn't just me! And glad there's a fix for it. But for the dumb newbies to this (ie me), is this fix just for the dashboard? Do I just download the zip file and copy it into my node-red folder?

well you can install manually by going into your .node-red user directory and running npm i node-red/node-red-dashboard but for some reason recently that has been taking up to 20 mins on a Pi. Or you can wait a couple of day until I publish the fixed version to npm.

OK, thank you. I might try it this afternoon then. The old laptop is in desperate need of a new hard drive, to the point where I'm a bit concerned it's just going to die on me!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.