# Problem with multible Templates in group

**URL:** <https://discourse.nodered.org/t/problem-with-multible-templates-in-group/13346>\
**Category:** Dashboard\
**Created:** [16 July 2019 10:43 UTC](https://discourse.nodered.org/t/problem-with-multible-templates-in-group/13346 "2019-07-16T10:43:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![max](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@max](https://discourse.nodered.org/u/max)\
**Post date:** [16 July 2019 10:43 UTC](https://discourse.nodered.org/t/problem-with-multible-templates-in-group/13346/1 "2019-07-16T10:43:48Z")

</div>

Hi,  
i have the following error.  
i use a Template for a Button. (so i can use other Icons etc.)  
The template looks like:

```auto
<button class="single" ng-click="send(msg)" type="button"><span class="{{msg.icon}} {{msg.state}}"></span></button>

```

i inject msg.payload etc via an function node.

the Problem is:  
when i use this template multible times in one Group node red restarts.  
in the log file is see the following errors:

16 Jul 12:31:01 - [red] Uncaught Exception:  
16 Jul 12:31:01 - TypeError: Cannot set property 'socketid' of undefined  
at Object.beforeSend (/home/pi/.node-red/node\_modules/node-red-dashboard/nodes/ui\_template.js:79:33)  
at EventEmitter.handler (/home/pi/.node-red/node\_modules/node-red-dashboard/ui.js:274:26)  
at emitOne (events.js:121:20)  
at EventEmitter.emit (events.js:211:7)  
at emitOne (events.js:116:13)  
at Socket.emit (events.js:211:7)  
at /home/pi/.node-red/node\_modules/socket.io/lib/socket.js:528:12  
at \_combinedTickCallback (internal/process/next\_tick.js:132:7)  
at process.\_tickDomainCallback (internal/process/next\_tick.js:219:9)  
nodered.service: main process exited, code=exited, status=1/FAILURE  
Unit nodered.service entered failed state.  
nodered.service holdoff time over, scheduling restart.  
Stopping Node-RED graphical event wiring tool...  
Starting Node-RED graphical event wiring tool...  
Started Node-RED graphical event wiring tool.  
16 Jul 12:31:04 - [info]

anyone has an idea ?  
Thank you very much

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 July 2019 16:05 UTC](https://discourse.nodered.org/t/problem-with-multible-templates-in-group/13346/2 "2019-07-16T16:05:20Z")

</div>

Post the output you get when you start node red from the terminal. That will show us what versions of node-red, node etc you are using. Do whatever you do to cause the crash so that is included also.
