Scene edits do not save. (Fixed)

This seems to have been a problem I caused by too much text in my Lua for triggers and scenes.

I removed several long-winded comments, and simplified some of my code, and the “Submit” button started working again.

amg0 pointed out that scenes are saved via an http GET Api, and that is limited in length by design.

So, all is working again, and I’m being more concise with my comments. :-[

Hi amg0,

I keep hoping someone else will have this problem, but maybe it’s just me. Can you see what I’m doing wrong?

More often than not, when I edit an existing scene in AltUI, I can’t really SAVE the changes. For the test case today, I did the following:

  1. Click the wrench (spanner?) to edit scene
  2. Click on Trigger to open the Device Triggers screen
  3. Click the left side Check box to Disable my trigger 1 (of 2 on this scene)
  • The “Submit” box turns red at this point
  1. Click the Submit box
  • Messages box at top of screen displays “Edited Scene 40 Successfully”
  1. Click the Lua box to open Lua Edit screen
  2. Type test Lua code – Test
  3. Click Save Changes
  • The “Submit” box turns red at this point
  • Messages box at top of screen displays “Event Lua code edited, remember to save your changes”
    (8 Click the Submit box (again)
  • Messages box at top of screen adds the “Edited Scene 40 Successfully” message to the “remember to save chnages” Line
  • “Edit Sucessful” line disappears, leaving only the “remember to save” line

What do I do Now? I do not see any options to “save my changes”.

  1. I do a CTRL F5 and go back in to see the edits are not saved.

I’ve tried Reload Luup Engine before and after the browser refresh, but no success

I’m using Google Chrome Version 46.0.2490.71 m on a Windows 8.1 PC
(2) Vera 3’s - Primary on Version 1.7.619 Secondary on 1.7.690

See attached Console log for clues?

you do have an issue as I can see this

Uncaught TypeError: Cannot read property 'length' of undefined

but what you gave is a very partial console log so I cant see file / line number etc so cannot help much. can you please get me the exact ALTUI version number and a full console log more like an example attached ?

by the way you do not have to save several time the proper way would be

  1. Click the wrench (spanner?) to edit scene
  2. Click on Trigger to open the Device Triggers screen
  3. Click the left side Check box to Disable my trigger 1 (of 2 on this scene)
  • The “Submit” box turns red at this point
  1. DO NOT CLICK the Submit box , finish all your changes first
  2. Click the Lua box to open Lua Edit screen
  3. Type test Lua code – Test
  4. Click Save Changes
  • Messages box at top of screen displays “Event Lua code edited, remember to save your changes”
  1. Click the Submit box
  • Messages box at top of screen adds the “Edited Scene 40 Successfully” message to the “remember to save chnages” Line
  • “Edit Sucessful” line disappears, leaving only the “remember to save” line

Success message = green, they disappear automatically
Info message = Blue , they stick
After clicking on submit you have nothing else to do, it should be saved.
Now to really test, you can close ALTUI window and restart it and check your changes.

I do think you have a different issue but for that I need the exact console log with files & linenumbers
thx

I have to agree that it’s another issue, but not sure how to find it or provide what you need.

AltUI is now v0.93.845, but was v0.92.837 on my original post

The log doesn’t contain much, because nothing seems to make an entry into the log except a refresh or Luup reload

I know I only need to Submit once, but I keep hitting it just hoping it will stick one time.

The attached is eveything from starting on the home page with
Navigated to http://10.84.8.111/port_3480/data_request?id=lr_ALTUI_Handler&command=home

None of my edits shows any entries into the log file. After the Submit box is clicked, I see nothing in the log, and the Vera3 lights don’t show anything.

the 2nd line in the log file is when I click to move on to the Device screen. I kept the log open, did a Luup restart, went back in and saw changes were not saved. I then went to UI7 and back to AltUI and did more scene changes, including adding a new device trigger, and still was not saved.

Please let me know if there is something else I can try?

Thanks again,

Mike

[quote=“ilikelife, post:4, topic:189304”]I have to agree that it’s another issue, but not sure how to find it or provide what you need.

AltUI is now v0.93.845, but was v0.92.837 on my original post

The log doesn’t contain much, because nothing seems to make an entry into the log except a refresh or Luup reload

I know I only need to Submit once, but I keep hitting it just hoping it will stick one time.

The attached is eveything from starting on the home page with
Navigated to http://10.84.8.111/port_3480/data_request?id=lr_ALTUI_Handler&command=home

None of my edits shows any entries into the log file. After the Submit box is clicked, I see nothing in the log, and the Vera3 lights don’t show anything.

the 2nd line in the log file is when I click to move on to the Device screen. I kept the log open, did a Luup restart, went back in and saw changes were not saved. I then went to UI7 and back to AltUI and did more scene changes, including adding a new device trigger, and still was not saved.

Please let me know if there is something else I can try?

Thanks again,

Mike[/quote]

you seem to have captured the “UI7” javascript logs, not ALTUI’s one
to make sure, close all windows, open altui in chrome, press ctrl+shif+J

Not sure you will like this one much better, but I do see one error, so maybe it will help. ???

I made 3 different edits to a scene, including adding a new trigger with a test Lua entry, and then hit Submit. None of that made any entries in the log. Maybe that’s why it doesn’t save?

Don’t know if it helps, but most times I do a Ctrl F5, it clears the screen and I get a brief message at the bottom left saying "waiting for 10.84.x.x Then I get a blank screen. If I wait about 30 seconds and do another Ctrl F5, I then see the AltUI Home screen.

Sorry to make this difficult, but appreciate any help you provide.

[quote=“ilikelife, post:6, topic:189304”]Not sure you will like this one much better, but I do see one error, so maybe it will help. ???

I made 3 different edits to a scene, including adding a new trigger with a test Lua entry, and then hit Submit. None of that made any entries in the log. Maybe that’s why it doesn’t save?

Don’t know if it helps, but most times I do a Ctrl F5, it clears the screen and I get a brief message at the bottom left saying "waiting for 10.84.x.x Then I get a blank screen. If I wait about 30 seconds and do another Ctrl F5, I then see the AltUI Home screen.

Sorry to make this difficult, but appreciate any help you provide.[/quote]

no that does not help unforunately. your files are not showing any error; the 500 internal server error is normal while Luup is restarting

what I need is the console where we can see the original error you reported

Uncaught TypeError: Cannot read property 'length' of undefined but with all the other lines before and after that

Let s also try another approach:
go to MISC DEBUG Javascript code and type this to send me the result
MultiBox.getSceneByAltuiID(“0-40”)

Thanks amgo,

I sent the scene output via pm. I’ll try to duplicate the earlier error and get the log, but can’t until tomorrow.