netcreateorg / netcreate-2018

Please report bugs, problems, ideas in the project Issues page: https://github.com/netcreateorg/netcreate-2018/issues
Other
11 stars 2 forks source link

Edge table crashes on sorting of comments in newest dev #265

Closed jdanish closed 1 year ago

jdanish commented 1 year ago

View nodes table, sort by comments. It works. Switch to edge table, sort by comments. It does not.

Note the TypeError error in this image as that appears in both local and DO runs. The web socket issue is only on DO and will be reported separately. It appears unrelated since that error does not appear on local runs.

Screenshot 2023-05-30 at 3 49 28 AM
benloh commented 1 year ago

I did see errors like this while developing. But generally quitting the server and restarting would fix the problem. Some of the server code is not auto-restarted with code changes (pulls). Try that first? (Sorting by comments on edge table works for me)

jdanish commented 1 year ago

Ok I’ll re-try and report back this afternoon thanks.

jdanish commented 1 year ago

Tried with running classroom, and it seems fine otherwise. Different error now from running locally, so re-posting.

Anything else I should try?

Screenshot 2023-05-30 at 3 02 05 PM
jdanish commented 1 year ago

OK, in case this helps: my new network (testing) I created by using ./nc.js with a new dataset name. Everything else works find. Comments still crashed. I added text to both comments. Now they sort fine. Could to be related to the issue where comments are not initially set correctly when empty, but only in the edge table? @benloh

benloh commented 1 year ago

Oh did you ever update your _default.template.toml file?
But yeah, you might be onto something. I'll see if I can reproduce it.

jdanish commented 1 year ago

Oh, no I just tried and get this error.

Screenshot 2023-05-30 at 4 59 31 PM

Other ideas? Also, I am not sure how likely it is anyone will remember to run ncRegenerateDefaultTemplate() so we might want a long-term alternative solution?

benloh commented 1 year ago

ncRegenerateDefaultTemplate was intended really only for developers and it only needs to be run when template-schema.js is changed. When we're done with this my plan was to commit and push _default.template.toml so this shouldn't be an issue in the future.

As for your error, check nc-logic.js:1228 -- there should be a JSCLI.AddFunction call with function ncRegenerateDefaultTemplate on the next line. Any chance you hadn't quit and restarted the server?

jdanish commented 1 year ago

OK, the issue was it only works if you do npm run dev, so I have done that. Seems it worked! And the problem is resolved.

benloh commented 1 year ago

Closing. All issues addressed.