• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Global Scripts import only imports the first script

    Scripting general Discussion
    2
    5
    1.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • AldoRamosA
      AldoRamos
      last edited by

      I have 2 Global Scripts, and while migrating to a new system I included global scripts in the export, but the imported system showed failures due to the 2nd script being missing.

      Manually importing the scripts confirms the same issue, the import page only shows 1 script imported.

      The obvious work-around is to import them one at a time, but it is a shock to get such unexpected results.

      1 Reply Last reply Reply Quote 0
      • terrypackerT
        terrypacker
        last edited by

        @AldoRamos what version of Mango are you importing them into? Also can you post the JSON without the full script contents so I can run a test import? Basically I just want to see the structure of the output you are trying to import, I don't specifically care about the scripts themselves.

        Thanks.

        1 Reply Last reply Reply Quote 0
        • AldoRamosA
          AldoRamos
          last edited by

          This is a MangoGT running Mango 3.7.4

          I stripped down the JSON to determine it was not the contents of the scripts causing the issue:

          {
             "sstGlobalScripts":[
                {
                   "xid":"GS_script1",
                   "name":"script1",
                   "script":"var script1 = {\n    name:	'script1'\n}"
                },
                {
                   "xid":"GS_script2",
                   "name":"script2",
                   "script":"var script2 =\n{\n    name:	'script2'\n}"
                }
             ]
          }
          
          1 Reply Last reply Reply Quote 0
          • terrypackerT
            terrypacker
            last edited by terrypacker

            @AldoRamos thanks I was able to replicate this for 3.7.x Mango. This is a bug in the Mango core (and only affects global scripts) so I'll try to get this fix put into the next 3.7.x release which should be relatively soon as there are a few little bug fixes we need to get out.

            Thanks.

            1 Reply Last reply Reply Quote 0
            • AldoRamosA
              AldoRamos
              last edited by

              That's about what I expected. Glad it was simple and isolated.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post