# Problem importing a bit of code. (Bug report?)

**URL:** <https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776>\
**Category:** General\
**Created:** [23 June 2020 05:17 UTC](https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776 "2020-06-23T05:17:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 June 2020 05:17 UTC](https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776/1 "2020-06-23T05:17:23Z")

</div>

Continuing the discussion from [LED Brightness, for(), dash board slider, dimming](https://discourse.nodered.org/t/led-brightness-for-dash-board-slider-dimming/28706/2):

Out of curiosity I imported this flow.

## I can't use is / it doesn't work.

Clicking on the `inject` node - which injects `200` nothing happens. It is no injected.  
I added an extra `debug` node and there is nothing coming out of the `inject` node.

Just above is another flow and when I click on it's `inject` node I get the message saying it was injected.

I'm open to why it isn't working.

Pictures:

 ![Screenshot from 2020-06-23 15-12-50](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/a/ba2194ecdbdb98ccf53270a5d6c6a7c8b04bb802.png)

 ![Screenshot from 2020-06-23 15-12-59](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/c/bce8b4d24167ece926166c7449358f70f80e44de.png)

The mouse turns into the **finger** indicating it is ready to be pressed, but clicking the mouse: nothing happens.

N.R. 1.0.3.

Update:

To further try and find out what is going on I opened the `inject` node.  
Which I now notice is _called_ **inject**

I also added an `inject` node from my palette. (Shown not deployed)

 ![Screenshot from 2020-06-23 15-18-53](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/0/e0a045e4bf2aadbbd9e6b0b4cbf8d11a9420185d.png)

Look at how there is on **name**

Now look when I open _my_ `inject` node:

 ![Screenshot from 2020-06-23 15-19-01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/8/08f6121d0065512fa2aee2246740b6a9bf60f029.png)

I am suspicious this is a bug between the new Beta version and 1.0.3

---

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [23 June 2020 06:55 UTC](https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776/2 "2020-06-23T06:55:32Z")

</div>

you are importing an inject node that has been created with the new beta version, which makes the inject node more versatile, but breaks the ability to import flows using it in old versions (which is expected since it adds new functionality).

If you change something about the node material, e.g. change the name and then do a deploy, it should work again.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 June 2020 06:57 UTC](https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776/3 "2020-06-23T06:57:29Z")

</div>

> [@cinhcet](#):
>
> you are importing an inject node that has been created with the new beta version

I am importing the flow as posted by @bakman2. Which has the `inject` node.

Looking at the pictures/screen shots it doesn't _give_ me any options as I am only on 1.0.3.  
Which means the flow is academic for use unless I add a _local_ `inject` node and make it inject `200`.

---

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [23 June 2020 07:05 UTC](https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776/4 "2020-06-23T07:05:01Z")

</div>

you are 100% correct

The point is, the JSON of an inject node created in 1.1 beta is different than the JSON of an inject node created below 1.1. Therefore, the old code (1.0.3 included) does not really know what to do with it.

You would need to change the code of 1.0.3 in order to correctly deal with it, which is kind of pointless, since then you can also update to the new version, when it is out.  
The other way around, meaning that if you import an inject node that has been created below 1.1 into 1.1 is handled in the code.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 June 2020 07:07 UTC](https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776/5 "2020-06-23T07:07:01Z")

</div>

Or I just use a local `inject` node and get it to inject `200` and test the flow.

But it is a problem of which people should be told to avoid problems like this when people with _older_ versions import flows from people with the _newer_ version and wonder why they don't work.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [23 June 2020 07:24 UTC](https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776/6 "2020-06-23T07:24:17Z")

</div>

The changes made in 1.1 were meant to be backward compatible if the node was configure to inject only payload and topic so that we'd avoid this sort of issue. I'll investigate why it isn't working. Thanks for highlighting.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [28 June 2020 03:52 UTC](https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776/7 "2020-06-28T03:52:10Z")

</div>

Just asking of anything has happened on this.  
No big deal. Just asking.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [28 June 2020 15:54 UTC](https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776/8 "2020-06-28T15:54:50Z")

</div>

fixed in dev branch.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 July 2020 15:54 UTC](https://discourse.nodered.org/t/problem-importing-a-bit-of-code-bug-report/28776/9 "2020-07-12T15:54:51Z")

</div>

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