Bug with newly created plots

This has been going on for a while on a test/sandbox. Today, I set all the files back to default from Git, but I’m still getting this error.

I have no idea if changing the IC time factored into it, but I know it happened right after I removed the IC date info and set it back to just default time.

  • Server opened, setup with the IC date of 1885
  • Plots 1 and 2 opened
  • IC time removed, just let everything default to today’s date
  • Plot 3 opened
  • I start getting this error on the plots page on the portal:

2020-03-30 06:15:29 ERROR - Error in Web Request: client= error=comparison of Array with Array failed backtrace=["/home/ares/aresmush/plugins/scenes/web/get_plots_handler.rb:5:in sort_by'", "/home/ares/aresmush/plugins/scenes/web/get_plots_handler.rb:5:in handle’", “/home/ares/aresmush/engine/aresmush/commands/dispatcher.rb:145:in block (2 levels) in on_web_request'", "/home/ares/aresmush/engine/aresmush/commands/dispatcher.rb:139:in each’”, “/home/ares/aresmush/engine/aresmush/commands/dispatcher.rb:139:in block in on_web_request'", "/home/ares/aresmush/engine/aresmush/error_block.rb:6:in with_error_handling’”, “/home/ares/aresmush/engine/aresmush/commands/dispatcher.rb:138:in on_web_request'", "/home/ares/aresmush/engine/aresmush/web/engine_api_server.rb:89:in block in handle_request’”, “/home/ares/aresmush/engine/aresmush/error_block.rb:6:in with_error_handling'", "/home/ares/aresmush/engine/aresmush/web/engine_api_server.rb:81:in handle_request’”]

If I delete the newly created plot, the old ones display just fine; the individual plot pages also display just fine. It also throws this error on the scenes page, since it’s looking for that list of plots there, I assume.

You should be able to see the associated github - it’s under “gaslighter.” Everything should be vanilla as of this morning.

1 Like

You can’t edit the IC time by editing a plot, so I’m really not sure what your step #3 actually means. What exactly did you remove from where?

The start and end dates on a plot are determined by its associated scenes. A plot with no scenes (which I presume your newly-created plots would be) has no dates.

I’m not seeing any issues with newly-crated plots on my test system.

Yeah, I haven’t been able to reproduce it elsewhere, either. It just happened one day. I mention the IC time only because I had fuddled with it right before plots broke.

I just changed the year offset in that config, closed plot #2, opened plot #3, noticed the listing was broken, went quickly to close a scene tied to plot #2, and the edit page for the active scene was throwing the same error. I deleted plot #3, which allowed me to edit the open scene and assign it to plot #2.

I can still assign things to the plots that existed before this started happening, but - if I add a new plot - it starts throwing that error.

It’s not critical, since I haven’t reproduced it, and it’s just on a sandbox where I test things, but I thought I’d throw it out there, in case it makes sense to you.

So if you add a brand new plot now, does it have the same error? Or has it mysteriously fixed itself?

Brand new plot still does it. Just made a new one and checked the plots page, then tried to edit a scene in progress; both pages give the same error:

2020-03-30 17:12:04 ERROR - Error in Web Request: client= error=comparison of Array with Array failed backtrace=["/home/ares/aresmush/plugins/scenes/web/get_plots_handler.rb:5:in sort_by'", "/home/ares/aresmush/plugins/scenes/web/get_plots_handler.rb:5:in handle’", “/home/ares/aresmush/engine/aresmush/commands/dispatcher.rb:145:in block (2 levels) in on_web_request'", "/home/ares/aresmush/engine/aresmush/commands/dispatcher.rb:139:in each’”, “/home/ares/aresmush/engine/aresmush/commands/dispatcher.rb:139:in block in on_web_request'", "/home/ares/aresmush/engine/aresmush/error_block.rb:6:in with_error_handling’”, “/home/ares/aresmush/engine/aresmush/commands/dispatcher.rb:138:in on_web_request'", "/home/ares/aresmush/engine/aresmush/web/engine_api_server.rb:89:in block in handle_request’”, “/home/ares/aresmush/engine/aresmush/error_block.rb:6:in with_error_handling'", "/home/ares/aresmush/engine/aresmush/web/engine_api_server.rb:81:in handle_request’”]

The plot itself looks fine. I can go straight to the /plot/9 page.

So a brand new plot with no scenes gives you the error?

Try running this command:

ruby Scene.all.select { |s| !s.icdate }.map { |s| s.id }

It should return an empty list, because the ‘icdate’ property should never be nil. It’s set automatically when a scene is created. If you somehow did something that set the icdate property to nil for a scene that’s part of a plot, you could get that error.

Correct. A brand new plot with no scenes. I create it just fine, go to /plots or edit an active scene, error.

Got nothing back from the command: []